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
allow_client_generated_ids ignored in POST #72
Comments
Hi, Thanks for letting me know! |
Thank you for the fast response! I don't fully understand b3512db, but doesn't it imply that the id must also be called 'id'? (...which may or may not be the case when |
Hi, I should've read your report better. Anyway, I'll look into it again later this week. |
Thanks for reopening the issue! Here is my model (built on the example/mini_app.py)
|
Hi, Can you check if e61742c works for you? (The "id" in the POST swagger will be ignored because you supply the PKs in the attributes) |
Yes, that works for me! |
Thank you for a great library that is saving me tons of time!
I have a problem using
allow_client_generated_ids
on one of my model-classes: Unless I add a line insafrs/base.py:_s_post()
I get an exception claiming that my "client generated id" (the one I needed to set myself) isNone
. - I think it was incorrectly removed without checking the truth ofcls.allow_client_generated_ids
.My solution is to modify the beginning of
_s_post()
:(After this change I still needed to make sure that the class hat a GET as well as a POST-method (since it could be accessed via a relationship I thought I could get away without the GET), but then everything worked like a charm! :-)
The text was updated successfully, but these errors were encountered: