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