Models: Aktuální ročník je property
This commit is contained in:
parent
1f789f6ad0
commit
1004e785de
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue