Conversation
Deployment
Hotfix deployment 🚑
Deployment
Deployment
Deployment
Hotfix deployment
Deployment
Always use the pull request template
Deployment
Deployment
Deployment
Deployment
Deployment
Deployment
elisakiv
left a comment
There was a problem hiding this comment.
Other than my singular comment, I can't seem to find any bugs or issues when running the code locally and looking at all the things I think will be impacted by the changes.
Maybe have a look at the failing check by codeclimate for some code cleanup stuff while you are changing things, it seems to mostly be about too many or not enough blank lines and similar nitpick.
Well done with the PR!
ddabble
left a comment
There was a problem hiding this comment.
(Finally found some free time to review this 😅)
Very well done! 😄 I have some improvement suggestions below, but I'm impressed by your seemingly solid grasp of Django! 😊
src/make_queue/migrations/0035_coursepermission_printer3dcourse_course_permissions_and_more.py
Show resolved
Hide resolved
src/make_queue/templates/make_queue/course/printer_3d_course_list.html
Outdated
Show resolved
Hide resolved
|
Btw, it looks like you based this branch on But we should definitely squash-merge the PR, unless you're planning on cleaning up the commit history before merging. |
Gunvor4
left a comment
There was a problem hiding this comment.
Good work! 👍 I don't have a lot of comments regarding this PR. But when I was reviewing, I realized that this would have been a much easier job if there were more comments in the code, so I would like to request some comments / explanations in the code. The make_queue app contains maybe the most difficult code on the entire page, so especially when we make changes to this app, we should make an effort to make this part of the page more understandable for future members of the dev committee.
A more thorough description of the PR could also have been helpful.
Gunvor4
left a comment
There was a problem hiding this comment.
There are some problems with course registrations, both with the form itself, and with the behaviour of the init method on the Printer3DCourseForm. These have been there before, so they were not introduced by this PR, but they should nonetheless be fixed since we are changing this part of the page anyway.
First of all - it makes very little sense to have fields for both username and user, especially since it is actually possible to enter different user names in these two fields. The 'username' field is coupled to the 'full name' field, while the 'user' field suggests users from the User model while typing. This is a nice feature that should be kept in order to minimize the change for typos when entering usernames. Therefore, I would suggest removing the 'username' field, and auto-filling the 'full name' field from the 'user' field instead.
Also - if a user is already added to the User model with an EM number, the EM number will be erased from the User model when the same user is added to the Printer3DCourse model without an EM number. It is possible that the EM number will be restored by information received from Feide, but new instances to the Printer3DCourse model should still not be able to delete information from the User model, so this is obviously a bug, and it should be fixed. If an EM number is already present for the user that is being added to the Printer3DCourse model - it should instead be auto-filled in the EM number field, like the user's full name is in the 'full name' field.
Proposed changes
Machine types and courses use a new permission class instead of boolean for usage requirements
Areas to review closely
Checklist
(If any of the points are not relevant, mark them as checked)
makemigrations,makemessagesandcompilemessagesmanagement commands and committed any changes that should be included in this PR