-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Handle null campaigns in PATCH #3685
Conversation
@ramyaragupathy I made the query more efficient. A yet better solution would be:
@JorgeMartinezG some opinion on this? |
@ramyaragupathy We should apply the same solution to the Interests field |
What about this? If you want to avoid some unneeded query when model and dto have same ids
|
@JorgeMartinezG your proposal has some problems:
I added the |
Corrected. BTW, everything is jumped when project_dto is None, not empty. the dto has campaigns field with a default of [], so it should deserialize to an empty list if campaigns is not provided in the endpoint. |
* Handle null campaigns in PATCH * make query more efficient * only update campaigns and interests when needed Co-authored-by: Wille Marcel <[email protected]>
To test, try saving a project with null campaigns and this should get through