Browse Source

seminar | admin | kdyz cislo nema prirazene cislo reseni

Kdyz cislo nema prirazene cislo reseni,
tak nelze zjistovat fazy
remotes/origin/prednasky
Bc. Petr Pecha 8 years ago
parent
commit
4fda307664
  1. 5
      seminar/admin.py

5
seminar/admin.py

@ -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…
Cancel
Save