diff --git a/advlabdb/advlabdb_independent_funs.py b/advlabdb/advlabdb_independent_funs.py index 5a4b5de..df32ade 100644 --- a/advlabdb/advlabdb_independent_funs.py +++ b/advlabdb/advlabdb_independent_funs.py @@ -24,3 +24,11 @@ def missing_formatter(view, context, model, name): return Markup("MISSING") 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