From e28242682f2a69e4ea033eaf5db18395263283e1 Mon Sep 17 00:00:00 2001 From: yura Date: Mon, 18 Nov 2024 20:52:00 +0200 Subject: [PATCH] add claer befor creating --- main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.py b/main.py index 4961421e..2cf7606f 100644 --- a/main.py +++ b/main.py @@ -15,6 +15,9 @@ def main() -> QuerySet: ("Scarlett", "Johansson") ] + Genre.objects.all().delete() + Actor.objects.all().delete() + for genre in genres: Genre.objects.create(name=genre)