I noticed the note on messy logic in AllocationChangeView.post() and thought I would try simplifying the method a bit. To eliminate unnecessary else statements and make it easier to follow the method logic, I changed the if statements to look for errors instead of check whether conditions were right to proceed.
I also performed a few other small refactoring tasks - removed unused imports, made small restructures to remove repeating code, removed unneeded else statements where they did not appear to improve legibility, etc.
I also added two functions for checking the permissions statuses of different users which I found helpful in the development of permissions-dependent views on the FASRC branch.
@claire-peters Thanks so much for your work on this. We found a few other bugs/issues and decided to merge your changes in this PR with a new branch. Closing this in favor of #458.
I noticed the note on messy logic in AllocationChangeView.post() and thought I would try simplifying the method a bit. To eliminate unnecessary else statements and make it easier to follow the method logic, I changed the if statements to look for errors instead of check whether conditions were right to proceed.
I also performed a few other small refactoring tasks - removed unused imports, made small restructures to remove repeating code, removed unneeded else statements where they did not appear to improve legibility, etc.
I also added two functions for checking the permissions statuses of different users which I found helpful in the development of permissions-dependent views on the FASRC branch.