.
This commit is contained in:
+5
-11
@@ -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()])
|
||||
|
||||
Reference in New Issue
Block a user