Merge branch 'frost' into upgrade-to-sqlalchemy2
This commit is contained in:
commit
3e66d8a7bb
23 changed files with 71 additions and 202 deletions
|
@ -34,7 +34,6 @@ class Submission(CreatedBase):
|
|||
stickied_utc: Mapped[int | None] = mapped_column(Integer)
|
||||
is_pinned: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False)
|
||||
private: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False)
|
||||
club = Column(Boolean, default=False, nullable=False)
|
||||
comment_count: Mapped[int] = mapped_column(Integer, default=0, nullable=False)
|
||||
over_18: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False)
|
||||
is_bot: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False)
|
||||
|
@ -172,7 +171,6 @@ class Submission(CreatedBase):
|
|||
@lazy
|
||||
def shortlink(self):
|
||||
link = f"/post/{self.id}"
|
||||
if self.club: return link + '/-'
|
||||
|
||||
output = title_regex.sub('', self.title.lower())
|
||||
output = output.split()[:6]
|
||||
|
@ -253,7 +251,6 @@ class Submission(CreatedBase):
|
|||
'distinguish_level': self.distinguish_level,
|
||||
'voted': self.voted if hasattr(self, 'voted') else 0,
|
||||
'flags': flags,
|
||||
'club': self.club,
|
||||
}
|
||||
|
||||
return data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue