-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: enable admin to delete any order #6172
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
Conversation
|
And what happens on deleting order? Refund? |
Codecov Report
@@ Coverage Diff @@
## development #6172 +/- ##
===============================================
+ Coverage 65.26% 65.27% +0.01%
===============================================
Files 287 287
Lines 14713 14710 -3
===============================================
Hits 9602 9602
+ Misses 5111 5108 -3
Continue to review full report at Codecov.
|
|
@iamareebjamal No, the project has no refund ability yet. |
|
But I see no changes related to admin |
|
@iamareebjamal sorry for that, forgot to change admin permissions. |
abhinavk96
left a comment
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.
Shouldn't you be modifying the before_delete_hook if you really want to delete paid/placed orders?
|
shreyanshdwivedi
left a comment
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.
Please fix merge conflicts @uds5501
Also, I think that as it is soft deletion, the field is getting updated so adding check in before_update_object is fine. The data is passed through this function too.
| @@ -1,2 +1,2 @@ | |||
| import logging | |||
| from datetime import datetime | |||
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.
It was better before IMO
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.
@iamareebjamal arlgiht, changing it.
shreyanshdwivedi
left a comment
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.
Please resolve conflicts and squash your commits
3c41266 to
cd5ae28
Compare
|
@iamareebjamal @shreyanshdwivedi squashed the commits and resolved the conflicts, please review now. |
| else: | ||
| check_event_user_ticket_holders(order, data, element) | ||
| if data[element] and data[element] != getattr(order, element, None): | ||
| if element not in ['status', 'deleted_at']: |
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.
let's push this to the previous line instead of additional nesting.
|
@uds5501 Are we good closing it ? |
|
@kushthedude Yes. Not a priority right now. |
Fixes #6173
Short description of what this resolves:
Allow admin to soft delete any order
Checklist
developmentbranch.