From 43366f4a28d5a94227cfc8ec3d4aac15ecb3a6bc Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 26 Apr 2022 02:26:27 +0200 Subject: [PATCH] fds --- files/classes/submission.py | 2 -- files/routes/front.py | 11 ----------- files/routes/posts.py | 3 --- 3 files changed, 16 deletions(-) diff --git a/files/classes/submission.py b/files/classes/submission.py index d4ec956fc..b30cf1e19 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -19,8 +19,6 @@ class Submission(Base): __tablename__ = "submissions" id = Column(Integer, primary_key=True) - if SITE in ('cringetopia.org','watchpeopledie.co'): - site = Column(Integer) author_id = Column(Integer, ForeignKey("users.id")) edited_utc = Column(Integer, default=0) created_utc = Column(Integer) diff --git a/files/routes/front.py b/files/routes/front.py index 55f057bb7..4de561148 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -318,9 +318,6 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" elif v.subs == 3: posts = posts.filter(Submission.sub != None, Submission.sub.notin_(v.all_blocks)) - if site == 'cringetopia.org': posts = posts.filter_by(site=1) - elif site == 'watchpeopledie.co': posts = posts.filter_by(site=2) - if gt: posts = posts.filter(Submission.created_utc > gt) if lt: posts = posts.filter(Submission.created_utc < lt) @@ -400,9 +397,6 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" if v and v.admin_level < 2: pins = pins.filter(Submission.author_id.notin_(v.userblocks)) - if site == 'cringetopia.org': pins = pins.filter_by(site=1) - elif site == 'watchpeopledie.co': pins = pins.filter_by(site=2) - pins = pins.all() for pin in pins: @@ -557,11 +551,6 @@ def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all", gt=0, lt=0, comments = g.db.query(Comment.id).filter(Comment.parent_submission != None) - if site == 'cringetopia.org': - comments = comments.join(Submission, Comment.parent_submission == Submission.id).filter(Submission.site == 1) - elif site == 'watchpeopledie.co': - comments = comments.join(Submission, Comment.parent_submission == Submission.id).filter(Submission.site == 2) - if v.admin_level < 2: private = [x[0] for x in g.db.query(Submission.id).filter(Submission.private == True).all()] diff --git a/files/routes/posts.py b/files/routes/posts.py index d3754c93c..760568876 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1128,9 +1128,6 @@ def submit_post(v, sub=None): ghost=ghost ) - if SITE == 'cringetopia.org': post.site = 1 - elif SITE == 'watchpeopledie.co': post.site = 2 - g.db.add(post) g.db.flush()