From 96a32a3c3a9a2892ab1be5ef9e4e1e6650415674 Mon Sep 17 00:00:00 2001 From: Mo8it Date: Sat, 21 Aug 2021 23:31:16 +0200 Subject: [PATCH] Improved repr for ExperimentMark --- advlabdb/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/advlabdb/models.py b/advlabdb/models.py index 23c90e2..7185462 100644 --- a/advlabdb/models.py +++ b/advlabdb/models.py @@ -124,7 +124,7 @@ class PartStudent(db.Model): category, ) else: - flash(f"Final part mark did not change for {self} from {oldFinalPartMark}.") + flash(f"Final part mark did not change for {self} from {oldFinalPartMark}.", "warning") def repr(self): return f"{self.student.repr()} {self.part.repr()}" @@ -481,7 +481,9 @@ class ExperimentMark(db.Model): return ExperimentMark(part_student=part_student, group_experiment=group_experiment) def repr(self): - return f"Oral {self.oral_mark}; Prot {self.protocol_mark}" + return ( + f"Oral {self.oral_mark}; Prot {self.protocol_mark}; Exp {self.group_experiment.semester_experiment.repr()}" + ) def __repr__(self): return f""