From 1004e785de9ff0641ac8e2c7cbc3b45cfff893b4 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Thu, 19 Dec 2019 01:29:53 +0100 Subject: [PATCH] =?UTF-8?q?Models:=20Aktu=C3=A1ln=C3=AD=20ro=C4=8Dn=C3=ADk?= =?UTF-8?q?=20je=20property?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/seminar/models.py b/seminar/models.py index bf68d015..fefd72d3 100644 --- a/seminar/models.py +++ b/seminar/models.py @@ -1544,6 +1544,7 @@ class Nastaveni(SingletonModel): aktualni_cislo = models.ForeignKey(Cislo, verbose_name='poslední vydané číslo', null=False, on_delete=models.PROTECT) + @property def aktualni_rocnik(self): return self.aktualni_cislo.rocnik