This commit is contained in:
Ross
2021-11-25 18:00:21 +00:00
parent 55ecb447e4
commit 98984552e8
+5 -11
View File
@@ -229,13 +229,13 @@ class Series(models.Model):
def __str__(self):
if self.atlas:
atlas_id = ", ".format([atlas.pk for atlas in self.atlas.all()])
#atlas_id = self.atlas.pk
if self.case:
case_id = ", ".format([case.pk for case in self.case.all()])
#case_id = self.case.pk
else:
atlas_id = "None"
case_id = "None"
return "{}/{} : {} [{}]".format(self.pk,
self.get_examination(), self.description, atlas_id
self.get_examination(), self.description, case_id
)
def get_author_objects(self):
@@ -244,12 +244,6 @@ class Series(models.Model):
return self.author.all()
else:
return ["None"]
if self.atlas:
authors = [i for i in self.atlas.author.all()]
else:
authors = []
return authors
def get_author_display(self):
return ", ".join([i.username for i in self.get_author_objects()])