Fix emoji search after Marsey caching revert.
parent
261abe3161
commit
2304876348
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue