u
This commit is contained in:
@@ -6,8 +6,8 @@ export async function assertSupplier(provider, tx, companyId, supplierId) {
|
||||
if (supplierId == null) {
|
||||
return null;
|
||||
}
|
||||
if (!Number.isFinite(supplierId)) {
|
||||
throw new Error('Supplier not found');
|
||||
if (typeof supplierId !== 'number' || !Number.isInteger(supplierId) || supplierId <= 0) {
|
||||
throw new Error('Invalid supplierId');
|
||||
}
|
||||
|
||||
const isSqlite = provider?.dialect === 'sqlite3';
|
||||
|
||||
Reference in New Issue
Block a user