Add user permission checks for series editing and enhance author display method

This commit is contained in:
Ross
2026-02-09 12:27:20 +00:00
parent 23f33ac7ae
commit 3c8238d737
4 changed files with 26 additions and 12 deletions
+1 -11
View File
@@ -387,7 +387,7 @@ class SeriesImageBase(models.Model):
super().save(*args, **kwargs) # Call the "real" save() method.
class SeriesBase(models.Model):
class SeriesBase(models.Model, AuthorMixin):
info = models.TextField(
blank=True,
help_text="Description of stack, for admin organisation, will not be visible when taking",
@@ -444,16 +444,6 @@ class SeriesBase(models.Model):
return False
def get_author_objects(self):
"""Returns a list of authors"""
if self.author:
return self.author.all()
else:
return ["None"]
def get_author_display(self):
return ", ".join([i.username for i in self.get_author_objects()])
def get_examination(self):
"""Returns a comma seperated text list of regions"""
return str(self.examination)