mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Add str_without_semester_formatter
This commit is contained in:
parent
41ed476a2f
commit
97b96f220f
1 changed files with 8 additions and 0 deletions
|
@ -24,3 +24,11 @@ def missing_formatter(view, context, model, name):
|
|||
return Markup("<span style='color:red'>MISSING</span>")
|
||||
|
||||
return attr
|
||||
|
||||
|
||||
def str_without_semester_formatter(view, context, model, name):
|
||||
attr = getattr(model, name)
|
||||
if attr is not None:
|
||||
return attr.str_without_semester()
|
||||
|
||||
return attr
|
||||
|
|
Loading…
Reference in a new issue