Skip to content
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 #1102

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Solution #1102

wants to merge 7 commits into from

Conversation

AchillesPython
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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! There are a few critical issues that need to be addressed before we can approve the pull request. Firstly, the actors' list should be changed to a list of tuples, each containing exactly two elements (first and last names). Additionally, ensure that the last name update for "Kianu Reaves" is corrected to "Reeves". Lastly, please include the necessary migrations as required. Once these issues are resolved, your code will be in great shape! Keep up the great work! 😊

✨ 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.

main.py Outdated

def main() -> QuerySet:
pass

genres = ["Western", "Action", "Dramma"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo in the genre name 'Dramma'. It should be 'Drama'. This is corrected later in the code, but it's better to fix it at the source.

main.py Outdated
genres = ["Western", "Action", "Dramma"]

actors = [
("George Klooney", "Kianu Reaves", "Scarlett Keegan"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actors' names are incorrectly grouped in tuples. Each actor should be represented as a separate tuple with first and last names, e.g., ('George', 'Klooney').

main.py Outdated
for genre in genres:
Genre.objects.create(name=genre)

for last_name, first_name in actors:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tuple unpacking in the loop is incorrect. The actors list should contain tuples of two elements (first name and last name), but currently, it contains tuples of three elements.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on addressing the previous issues! 🎉 Your code now meets the task requirements and constraints as specified. Here are some key points from the review:

  • The migration file 0001_initial.py correctly sets up the initial database schema with Actor and Genre models. Ensure it aligns with your current database schema requirements.
  • The models.py file is consistent with the migration file, which is excellent for maintaining consistency. Pay attention to the correct usage of the Actor model's last_name field.
  • The main.py file effectively populates the database with initial data and performs updates and deletions as required. Ensure the list of actors is a list of tuples with exactly two elements, as previously mentioned.

Your solution is approved to help you move forward with your learning. Please review the comments to further improve your code. Remember, addressing critical issues in the future will help avoid similar problems and enhance your coding skills. Keep up the good work and continue learning from your experiences! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

main.py Outdated
Comment on lines 11 to 13
actors = [
("George", "Klooney"), ("Kianu", "Reaves"), ("Scarlett", "Keegan"),
("Will", "Smith"), ("Jaden", "Smith"), ("Scarlett", "Johansson")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the list of actors is a list of tuples, each containing exactly two elements (first and last names), as per the task requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants