Fix const reassignment that broke accounting-frontend Docker build.
This commit is contained in:
@@ -18,7 +18,7 @@ export function GlobalPartySync() {
|
|||||||
|
|
||||||
const run = async () => {
|
const run = async () => {
|
||||||
try {
|
try {
|
||||||
const [owners, customersRaw, currentParties] = await Promise.all([
|
const [owners, customersRaw, initialParties] = await Promise.all([
|
||||||
apiGet<unknown>(ENDPOINTS.OWNERS).then(asList<ApiOwner>),
|
apiGet<unknown>(ENDPOINTS.OWNERS).then(asList<ApiOwner>),
|
||||||
apiGet<unknown>(ENDPOINTS.CUSTOMERS),
|
apiGet<unknown>(ENDPOINTS.CUSTOMERS),
|
||||||
acct.get(ACCOUNTING_ENDPOINTS.PARTIES).then(asList<Party>),
|
acct.get(ACCOUNTING_ENDPOINTS.PARTIES).then(asList<Party>),
|
||||||
@@ -28,6 +28,7 @@ export function GlobalPartySync() {
|
|||||||
? (customersRaw as ApiCustomer[])
|
? (customersRaw as ApiCustomer[])
|
||||||
: ((customersRaw as { results?: ApiCustomer[] }).results ?? [])
|
: ((customersRaw as { results?: ApiCustomer[] }).results ?? [])
|
||||||
|
|
||||||
|
let currentParties = initialParties
|
||||||
const batches = [
|
const batches = [
|
||||||
...mergeFunZoneParties(owners, currentParties, 'supplier'),
|
...mergeFunZoneParties(owners, currentParties, 'supplier'),
|
||||||
...mergeFunZoneParties(customers, currentParties, 'customer'),
|
...mergeFunZoneParties(customers, currentParties, 'customer'),
|
||||||
|
|||||||
Reference in New Issue
Block a user