فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
fix(A03): repair invalid company restore conditional syntax
davoodmehraban89 committed
Oct 20, 2026 at 08:35 UTC
1852082776f9dbfd80daf6c2afa1d76cfa6ba76b
1 file changed
+3
-2
src/core/CompanyBackupService.js
+3
-2
@@ -120,9 +120,10 @@ export async function restoreCompanyBackup(data, { companyId, userId, mode = 'me
120
}
121
if (existing) counts.updated++;
122
else counts.added++;
123
- if (store === 'audit_events') AuditService.authorizeRestore(tx, { companyId, rows: [row] });
123
+ if (store === 'audit_events') {
124
+ AuditService.authorizeRestore(tx, { companyId, rows: [row] });
125
await AuditService.restoreHistorical(tx, row);
125
- else await tx.putRaw(store, row);
126
+ } else await tx.putRaw(store, row);
127
}
128
}
129