#5878 - FiscalData validations #1851
|
@ -16,7 +16,7 @@ const validations = [{
|
|||
module = module.substring(0, module.length - 1);
|
||||
model = models[module];
|
||||
}
|
||||
if (!model) throw new UserError('');
|
||||
if (!model) throw new Error('No matching model found');
|
||||
const {accepts} = model.sharedClass.methods().find(method => method.name === path);
|
||||
for (const [key, value] of Object.entries(body)) {
|
||||
const accept = accepts.find(acc => acc.arg === key);
|
||||
|
|
Loading…
Reference in New Issue