-
Notifications
You must be signed in to change notification settings - Fork 271
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
Bugfix #1080: "Deactivated users reappeared" #1104
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for your work on this. It's leading the right way, but needs some changes before integration.
Some feedback :
- At all times, avoid copy-pasting code. Here the code to get the deactivated member list is in two different places. If we needed this code, it should probably go in the model instead ;
- I believe we don't actually need this code because the model can already tel us what are the deactivated members. Try to do this instead of building the list on your own
- In terms of UX, I believe it would be better to have a tooltip as I explained. I'm happy to change my mind on this if you have good arguments :-)
Anyway, thanks for taking the time to do this 👍. Let me know when you've made some edits.
Hi Almet! Thanks for reviewing my code. I rewrote the check function using the activated attribute, and moved it to the model. |
Hi @almet! Tooltips have been added. |
-Made involves_deactivated_members() a property of the Bill class -Removed flashed messages
Fixed #1080 by adding the deactivated member check. Corresponding test functions were also finished.
Details:
1. Added the deactivated member check for editing/deleting bills.
Compare the payer&owers list (POL) of the bill with the active member list (AML). If the relative complement of AML in POL (POL \ AML) is not empty, then the bill contains deactivated members and should not be edited/deleted.
2. Added two corresponding integration test functions.
Test:
Passed all the tests.