diff --git a/files/classes/marsey.py b/files/classes/marsey.py index 222ce0b13..a7bd82d48 100644 --- a/files/classes/marsey.py +++ b/files/classes/marsey.py @@ -26,7 +26,7 @@ class Marsey(Base): return self.tags.split(" ") + [self.name[len("marsey"):]] # type: ignore def json(self): - return { + data = { "name": self.name, "author_id": self.author_id, "submitter_id": self.submitter_id, @@ -35,3 +35,6 @@ class Marsey(Base): "created_utc": self.created_utc, "class": "Marsey", } + if "author" in self.__dict__ and self.author: + data["author"] = self.author + return data diff --git a/files/routes/static.py b/files/routes/static.py index 9a574c07d..6c6364c72 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -70,7 +70,7 @@ def get_marseys(db:scoped_session): if not FEATURES['MARSEYS']: return [] marseys = [] for marsey, author in db.query(Marsey, User).join(User, Marsey.author_id == User.id).filter(Marsey.submitter_id == None).order_by(Marsey.count.desc()): - marsey.author = author.username if FEATURES['ASSET_SUBMISSIONS'] or author == "anton-d" else None + marsey.author = author.username if FEATURES['ASSET_SUBMISSIONS'] else None setattr(marsey, "class", "Marsey") marseys.append(marsey) return marseys