18692: Aditional while loop variable added
authorDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Mon, 3 Oct 2022 08:26:13 +0000 (10:26 +0200)
committerDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Mon, 3 Oct 2022 08:26:13 +0000 (10:26 +0200)
Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla@contractors.roche.com>

src/common/frozen-resources.ts

index 10e18151619b14c0b1c834178e826de87e13d62b..7670720a96aa6fcd6dee136158f955be78639ce2 100644 (file)
@@ -9,7 +9,7 @@ export const resourceIsFrozen = (resource: any, resources): boolean => {
     let isFrozen: boolean = !!resource.frozenByUuid;
     let ownerUuid: string | undefined = resource?.ownerUuid;
 
-    while(!isFrozen && !!ownerUuid) {
+    while(!isFrozen && !!ownerUuid && resource.uuid !== ownerUuid) {
         const parentResource: ProjectResource | undefined = getResource<ProjectResource>(ownerUuid)(resources);
         isFrozen = !!parentResource?.frozenByUuid;
         ownerUuid = parentResource?.ownerUuid;