Explorar o código

fix: upsert subdomain check to insert only

KernelDeimos hai 8 meses
pai
achega
dfb2523bd6
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/backend/src/om/entitystorage/SubdomainES.js

+ 3 - 1
src/backend/src/om/entitystorage/SubdomainES.js

@@ -39,7 +39,9 @@ class SubdomainES extends BaseES {
             }
         },
         async upsert (entity, extra) {
-            await this._check_max_subdomains();
+            if ( ! extra.old_entity ) {
+                await this._check_max_subdomains();
+            }
 
             return await this.upstream.upsert(entity, extra);
         },