From ff4d09b2cc4ad271a07fec4b63a8d16680bed086 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 19 Feb 2024 00:13:50 +0200 Subject: [PATCH] fix WPD localhost --- files/classes/hole.py | 3 ++- files/classes/post.py | 2 +- files/classes/user.py | 2 +- files/routes/posts.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/files/classes/hole.py b/files/classes/hole.py index b4cc4200c..2c35dff10 100644 --- a/files/classes/hole.py +++ b/files/classes/hole.py @@ -25,7 +25,8 @@ class Hole(Base): stealth = Column(Boolean, default=False) public_use = Column(Boolean, default=False) created_utc = Column(Integer) - if SITE_NAME == 'WPD': + + if SITE == 'watchpeopledie.tv': snappy_quotes = None else: snappy_quotes = deferred(Column(String)) diff --git a/files/classes/post.py b/files/classes/post.py index 09a4cc936..827bc3554 100644 --- a/files/classes/post.py +++ b/files/classes/post.py @@ -74,7 +74,7 @@ class Post(Base): else: nsfw = False - if SITE_NAME == 'WPD': + if SITE == 'watchpeopledie.tv': cw = Column(Boolean, default=False) author = relationship("User", primaryjoin="Post.author_id==User.id") diff --git a/files/classes/user.py b/files/classes/user.py index d7e27a92e..625004fa6 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -150,7 +150,7 @@ class User(Base): group_creation_notifs = Column(Boolean, default=False) effortpost_notifs = Column(Boolean, default=False) - if SITE_NAME == 'WPD': + if SITE == 'watchpeopledie.tv': nitter = False imgsed = False controversial = False diff --git a/files/routes/posts.py b/files/routes/posts.py index febcf1c58..43f1ac604 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -590,7 +590,7 @@ def submit_post(v, hole=None): ghost=flag_ghost, ) - if SITE_NAME == 'WPD': + if SITE == 'watchpeopledie.tv': p.cw = request.values.get("cw", False, bool) if not p.draft: