You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I retrieve invoices from the API via the /api/invoices endpoint.
The validation (integer) for the due_days field fails and an exception is thrown if the due_days field of an invoice is a negative number in the response.
Negative due_days values are possible because there is no validation in the Salesking webinterface that disallows setting a due date prior to the invoice date.
As a workaround, I fixed it by changing the schema to "number" for the due_days field.
I think the Salesking webinterface validation should be updated, but the API validation as well for all records where due_days results in a negative now (before the webinterface change).
The text was updated successfully, but these errors were encountered:
mplattner
changed the title
Get invoice list: exception if due_days is a negative number
GET /api/invoices: exception if due_days is a negative number
Nov 10, 2018
I retrieve invoices from the API via the /api/invoices endpoint.
The validation (integer) for the due_days field fails and an exception is thrown if the due_days field of an invoice is a negative number in the response.
Negative due_days values are possible because there is no validation in the Salesking webinterface that disallows setting a due date prior to the invoice date.
As a workaround, I fixed it by changing the schema to "number" for the due_days field.
I think the Salesking webinterface validation should be updated, but the API validation as well for all records where due_days results in a negative now (before the webinterface change).
The text was updated successfully, but these errors were encountered: