diff --git a/main.py b/main.py index 4bc729a3..ae4f8986 100644 --- a/main.py +++ b/main.py @@ -7,21 +7,17 @@ def main() -> QuerySet: Genre.objects.create(name="Western") Genre.objects.create(name="Drama") - Genre.objects.create(name="Comedy") - + Genre.objects.create(name="Drama") Actor.objects.create(first_name="Jaden", last_name="Smith") Actor.objects.create(first_name="Will", last_name="Smith") Actor.objects.create(first_name="George", last_name="Clooney") Actor.objects.create(first_name="Keanu", last_name="Reeves") - Genre.objects.filter(name="Drama").update(name="Drama Updated") - - Actor.objects.filter(first_name="Jaden", last_name="Smith").update( - first_name="Jaden Updated", last_name="Smith Updated" + Genre.object.filter(name="Drama").update(name="Drama") + Actor.objects.filter(first_name="Jaden", + last_name="Smith").update( + first_name="Jaden", last_name="Smith" ) - - Genre.objects.filter(name="Drama Updated").delete() - - Actor.objects.filter(first_name="Jaden Updated").delete() - - return Actor.objects.order_by("last_name") + Genre.objects.filter(name="Drama").delete() + Actor.objects.filter(first_name="Jaden").delete() + return Actor.objects.filter(first_name="Jaden").order_by("last_name")