Fix Bug 2294: Incorrect notification in update descriptor
[osm/NG-UI.git] / src / app / users / project-role / ProjectRoleComponent.ts
index 3a7e612..0c1121b 100644 (file)
@@ -210,6 +210,10 @@ export class ProjectRoleComponent implements OnInit {
             this.projectRoleMap.project_role_mappings.push({ project: res.project_name, role: res.role_name });
         });
         if (this.projectRoleMap.project_role_mappings.length !== 0) {
+            if (!this.projectRoleForm.dirty) {
+                this.notifierService.notify('warning', this.translateService.instant('PAGE.TOPOLOGY.DATAEMPTY'));
+                return;
+            }
             this.isLoadingResults = true;
             this.restService.patchResource(apiURLHeader, this.projectRoleMap).subscribe((result: {}): void => {
                 this.isLoadingResults = false;