From b9c157b28e72bdaf59f9cd8845b1ddabdc08fe87 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Fri, 18 Oct 2024 20:48:09 -0400 Subject: [PATCH] tweak: start from 1 --- src/backend/src/om/entitystorage/AppES.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/src/om/entitystorage/AppES.js b/src/backend/src/om/entitystorage/AppES.js index ac99bcc0..09f71e52 100644 --- a/src/backend/src/om/entitystorage/AppES.js +++ b/src/backend/src/om/entitystorage/AppES.js @@ -91,7 +91,7 @@ class AppES extends BaseES { ( await old_entity.get('name') !== await entity.get('name') ); if ( throw_it && extra.options && extra.options.dedupe_name ) { const base = await entity.get('name'); - let number = 0; + let number = 1; while ( await app_name_exists(`${base}-${number}`) ) { number++; }