@vario-software/vario-app-framework-backend 2026.22.1 → 2026.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/migrator.js +18 -7
package/package.json
CHANGED
package/utils/migrator.js
CHANGED
|
@@ -346,10 +346,10 @@ const Migrator = class
|
|
|
346
346
|
children: [
|
|
347
347
|
{
|
|
348
348
|
type: 'FILTER',
|
|
349
|
-
property: '
|
|
349
|
+
property: 'appId',
|
|
350
350
|
operator: 'EQUALS',
|
|
351
351
|
values: [
|
|
352
|
-
|
|
352
|
+
this.app.client.appIdentifier,
|
|
353
353
|
],
|
|
354
354
|
},
|
|
355
355
|
],
|
|
@@ -365,17 +365,28 @@ const Migrator = class
|
|
|
365
365
|
},
|
|
366
366
|
);
|
|
367
367
|
|
|
368
|
-
const
|
|
368
|
+
const id = financeBackend?.data?.[0]?.id;
|
|
369
|
+
|
|
370
|
+
if (!id)
|
|
371
|
+
{
|
|
372
|
+
await this.methods.log(`No Finance Backend found for label "${label}"\n`, 'ERROR');
|
|
373
|
+
|
|
374
|
+
return null;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const { data: existingFinanceBackend } = await this.ApiAdapter.fetch(`/erp/finance/backend/${id}`, {
|
|
378
|
+
method: 'GET',
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
const { data: finance } = await this.ApiAdapter.fetch(`/erp/finance/backend/${id}`, {
|
|
369
382
|
method: 'PUT',
|
|
370
383
|
body: JSON.stringify({
|
|
371
|
-
|
|
384
|
+
...existingFinanceBackend,
|
|
372
385
|
description,
|
|
373
|
-
usePerformanceDate: false,
|
|
374
|
-
appId: this.app.client.appIdentifier,
|
|
375
386
|
}),
|
|
376
387
|
});
|
|
377
388
|
|
|
378
|
-
await this.methods.log(`Finance Backend with id "${finance.id}" successfully
|
|
389
|
+
await this.methods.log(`Finance Backend with id "${finance.id}" successfully updated\n`);
|
|
379
390
|
|
|
380
391
|
return finance;
|
|
381
392
|
},
|