Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET /api/invoices: exception if due_days is a negative number #2

Open
mplattner opened this issue Nov 10, 2018 · 0 comments
Open

GET /api/invoices: exception if due_days is a negative number #2

mplattner opened this issue Nov 10, 2018 · 0 comments

Comments

@mplattner
Copy link

mplattner commented 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).

@mplattner 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant