فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
fix: use WeakSet grant directly
davoodmehraban89 committed
Oct 19, 2026 at 18:57 UTC
0056fd1748e9222603c7cd8ada89f41ba8ca6c2e
1 file changed
+2
-2
src/core/AuditService.js
+2
-2
@@ -66,7 +66,7 @@ class AuditServiceImpl {
66
67
async restoreHistorical(tx, row) {
68
const authorization = authorizedRestoreTransactions.get(tx)?.get(row?.companyId);
69
- if (!authorization || !authorization.rows.has(row) ||
69
+ if (!authorization || !authorization.has(row) ||
70
!validId(row.companyId)) {
71
throw new Error('بازیابی مستقیم ممیزی خارج از جریان مجاز است');
72
}
@@ -78,7 +78,7 @@ class AuditServiceImpl {
78
(row.occurredAtUtc !== undefined && !validUtc(row.occurredAtUtc))) {
79
throw new Error('رکورد تاریخچه ممیزی نامعتبر است');
80
}
81
- authorization.rows.delete(row);
81
+ authorization.delete(row);
82
const copy = { ...row };
83
trustedAuditRows.add(copy);
84
await tx.add('audit_events', copy);