seminar | admin | kdyz cislo nema prirazene cislo reseni
Kdyz cislo nema prirazene cislo reseni, tak nelze zjistovat fazy
This commit is contained in:
parent
5adc4eecb9
commit
4fda307664
1 changed files with 3 additions and 2 deletions
|
@ -418,8 +418,9 @@ class ProblemAdmin(VersionAdmin):
|
||||||
return readonly_fields
|
return readonly_fields
|
||||||
if obj.cislo_zadani.faze != 'admin':
|
if obj.cislo_zadani.faze != 'admin':
|
||||||
readonly_fields += ['nazev', 'text_zadani', 'body']
|
readonly_fields += ['nazev', 'text_zadani', 'body']
|
||||||
if obj.cislo_reseni.faze != 'admin':
|
if obj.cislo_reseni:
|
||||||
readonly_fields += ['text_reseni']
|
if obj.cislo_reseni.faze != 'admin':
|
||||||
|
readonly_fields += ['text_reseni']
|
||||||
return readonly_fields
|
return readonly_fields
|
||||||
|
|
||||||
def get_queryset(self, request):
|
def get_queryset(self, request):
|
||||||
|
|
Loading…
Reference in a new issue