-
Notifications
You must be signed in to change notification settings - Fork 899
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
solution #940
base: master
Are you sure you want to change the base?
solution #940
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.
In new models, specify related_name, it won't be superfluous.
Remove the changes in the tests, perhaps you accidentally made them.
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.
Thank you for your hard work on this pull request! While you've done a great job addressing many aspects of the task, there are a few critical issues that need to be resolved before we can approve it:
-
Exception Handling: There are multiple places where exception handling is necessary to prevent the application from crashing, such as in the
update_user
,get_orders
, anddelete_movie_session_by_id
functions. Implementing proper exception handling will ensure the application handles errors gracefully. -
Return Types: Ensure that the return types in the function signatures match the actual return values, particularly in functions like
get_orders
andget_taken_seats
. -
User Model Configuration: Double-check that the
AUTH_USER_MODEL
setting is correctly configured to use your customUser
model if it is intended to replace the default one. -
Password Hashing: Verify that the
create_user
method hashes passwords correctly to avoid storing them in plain text.
These changes are crucial for the functionality and security of the application. Once you've addressed these issues, feel free to resubmit the pull request. Keep up the great work, and I'm confident you'll nail it! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
db/migrations/0002_user_order_alter_movie_actors_alter_movie_genres_and_more.py
Show resolved
Hide resolved
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.
Great job on your submission! 🎉 While the code is mostly well-structured and functional, there are a few critical areas that need attention to enhance security and robustness:
-
Exception Handling:
- Add exception handling for cases where a user or order with the given ID does not exist. This will prevent unhandled exceptions and improve user experience.
-
Password Hashing:
- Ensure that the
create_user
method hashes passwords correctly using theset_password
method to avoid storing them in plain text.
- Ensure that the
-
Type Annotations:
- Verify and correct the return types for functions like
get_orders
andget_taken_seats
to ensure clarity and compatibility, especially if using Python versions prior to 3.9.
- Verify and correct the return types for functions like
-
User Model Configuration:
- Confirm that the
AUTH_USER_MODEL
setting is correctly configured to use your customUser
model.
- Confirm that the
Addressing these issues will significantly improve the security and maintainability of your application. Keep up the good work, and continue refining your skills! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
No description provided.