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
The EventBase.internal_update method returns nil if there was no change and a model wrapper otherwise. The webapi expects to get a model wrapper at all times which causes a crash when it gets nil instead.
The webapi needs a model wrapper to formulate its response so that method should probably return one even if it's unchanged.
I have added a unit test that reproduces the problem in the fix-update-by-uuid2 branch. Please push your commits to that branch if you take up this issue.
The text was updated successfully, but these errors were encountered:
Problem
Webapi routes using the
update_by_uuid2
method crash if you try to update a record but pass the same value that is already in place in the database.Datapaths is affected and filters will also be affected after #513 is merged.
Reproduction
Solution
The EventBase.internal_update method returns
nil
if there was no change and a model wrapper otherwise. The webapi expects to get a model wrapper at all times which causes a crash when it getsnil
instead.The webapi needs a model wrapper to formulate its response so that method should probably return one even if it's unchanged.
I have added a unit test that reproduces the problem in the fix-update-by-uuid2 branch. Please push your commits to that branch if you take up this issue.
The text was updated successfully, but these errors were encountered: