1
0
Fork 0
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:
Mo 2022-06-01 23:15:33 +02:00
parent 41ed476a2f
commit 97b96f220f

View file

@ -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