From f19726127154d1b946f08d65e4085e2f87178424 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Mon, 11 Dec 2023 20:20:48 +0100 Subject: [PATCH] =?UTF-8?q?Opraven=C3=AD=20related=5Fname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tohle by mělo být nezávislé, nemůžeme vyrobit foreign key na něco, co už existuje… ERRORS: seminar.Nastaveni.aktualni_cislo: (fields.E304) Reverse accessor for 'seminar.Nastaveni.aktualni_cislo' clashes with reverse accessor for 'various.Nastaveni.aktualni_cislo'. HINT: Add or change a related_name argument to the definition for 'seminar.Nastaveni.aktualni_cislo' or 'various.Nastaveni.aktualni_cislo'. various.Nastaveni.aktualni_cislo: (fields.E304) Reverse accessor for 'various.Nastaveni.aktualni_cislo' clashes with reverse accessor for 'seminar.Nastaveni.aktualni_cislo'. HINT: Add or change a related_name argument to the definition for 'various.Nastaveni.aktualni_cislo' or 'seminar.Nastaveni.aktualni_cislo'. --- seminar/models/tvorba.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/models/tvorba.py b/seminar/models/tvorba.py index bc5636b8..8049d8cf 100644 --- a/seminar/models/tvorba.py +++ b/seminar/models/tvorba.py @@ -736,7 +736,7 @@ class Nastaveni(SingletonModel): # null=False, on_delete=models.PROTECT) aktualni_cislo = models.ForeignKey(Cislo, verbose_name='Aktuální číslo', - null=False, on_delete=models.PROTECT) + null=False, on_delete=models.PROTECT, related_name='aktualni_cislo_old') cena_sous = models.IntegerField(null=False, verbose_name="Účastnický poplatek za soustředění",