-
-
Notifications
You must be signed in to change notification settings - Fork 776
Bug fix in modified action delete API #5351
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
Changes from 1 commit
5194f38
3900f03
65b4827
11920b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -264,6 +264,9 @@ def delete(self, ref_or_id, requester_user): | |
| "Exception was %s", | ||
| e, | ||
| ) | ||
| action = ActionAPI.from_model(action_db) | ||
| action_db = ActionAPI.to_model(action) | ||
| Action.add_or_update(action_db) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you modify the unit tests to cover this change? |
||
| abort(http_client.INTERNAL_SERVER_ERROR, six.text_type(e)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, if the deletion is related to permission error, can you change the error code to 403 Forbidden here? Otherwise for any other error, return 500 is fine. |
||
| return | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to covert the models to ActionAPI and back to ActionDB here?