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

API-Endpoint requires budget and timeBudget to create a new customer #1713

Closed
MPW1412 opened this issue May 17, 2020 · 4 comments · Fixed by #1718
Closed

API-Endpoint requires budget and timeBudget to create a new customer #1713

MPW1412 opened this issue May 17, 2020 · 4 comments · Fixed by #1718
Milestone

Comments

@MPW1412
Copy link

MPW1412 commented May 17, 2020

When creating a new customer via the API, e. g. with kimai-python, Kimai rejects requests without time and timeBudget set.

I tried to adapt the API, but @kevinpapst told me, this was rather a bug in the Kimai api endpoint: kbancerz/kimai-python#1

To Reproduce
Steps to reproduce the behavior:

  1. Create a new customer with kimai-python
  2. Following error occurs:
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'X-Powered-By': 'PHP/7.4.5', 'Transfer-Encoding': 'chunked', 'Set-Cookie': 'PHPSESSID=nf3f4afk3o7o7kvg1f12qq4one; path=/; HttpOnly', 'Connection': 'keep-alive', 'Cache-Control': 'max-age=0, must-revalidate, private', 'Server': 'nginx', 'pragma': 'no-cache', 'Date': 'Sat, 16 May 2020 23:08:32 GMT', 'Expires': 'Sat, 16 May 2020 23:08:32 GMT'})
HTTP response body: {"code":400,"message":"Validation Failed","errors":{"children":{"name":{},"number":{},"comment":{},"company":{},"vatId":{},"contact":{},"address":{},"country":{},"currency":{},"phone":{},"fax":{},"mobile":{},"email":{},"homepage":{},"timezone":{},"color":{},"budget":{"errors":["This value should not be null."]},"timeBudget":{"errors":["This value should not be null."]},"visible":{}}}}
**Logfile**

Desktop/Smartphone
Please complete the following information if this seems to be a frontend issue:

  • Kimai Version 1.9
@kevinpapst
Copy link
Member

@MPW1412 can you give the branch from the PR a try?

@MPW1412
Copy link
Author

MPW1412 commented May 19, 2020

I can confirm the API works without modifications now. Thanks for fixing this so quickly, @kevinpapst!

@kevinpapst
Copy link
Member

Thanks for testing!

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants