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): def __str__(self):
if self.atlas: if self.case:
atlas_id = ", ".format([atlas.pk for atlas in self.atlas.all()]) case_id = ", ".format([case.pk for case in self.case.all()])
#atlas_id = self.atlas.pk #case_id = self.case.pk
else: else:
atlas_id = "None" case_id = "None"
return "{}/{} : {} [{}]".format(self.pk, return "{}/{} : {} [{}]".format(self.pk,
self.get_examination(), self.description, atlas_id self.get_examination(), self.description, case_id
) )
def get_author_objects(self): def get_author_objects(self):
@@ -244,12 +244,6 @@ class Series(models.Model):
return self.author.all() return self.author.all()
else: else:
return ["None"] return ["None"]
if self.atlas:
authors = [i for i in self.atlas.author.all()]
else:
authors = []
return authors
def get_author_display(self): def get_author_display(self):
return ", ".join([i.username for i in self.get_author_objects()]) return ", ".join([i.username for i in self.get_author_objects()])