From 172bbe5b60dc19e0b2f97c431e69c9d417b15c58 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Thu, 27 Jan 2022 00:10:17 -0600 Subject: [PATCH] prop moderation filters are a bit more sane --- app/properties.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/properties.py b/app/properties.py index d2e86d2..c90c5b3 100644 --- a/app/properties.py +++ b/app/properties.py @@ -131,9 +131,9 @@ def get(status="all"): if status=="all": query = db.session.query().select_from(Property).join(CharacterInfo, CharacterInfo.id==Property.owner_id).join(Account) elif status=="approved": - query = db.session.query().select_from(Property).join(CharacterInfo, CharacterInfo.id==Property.owner_id).join(Account).filter(Property.mod_approved==True) + query = db.session.query().select_from(Property).join(CharacterInfo, CharacterInfo.id==Property.owner_id).join(Account).filter(Property.mod_approved==True).filter(Property.privacy_option==2) elif status=="unapproved": - query = db.session.query().select_from(Property).join(CharacterInfo, CharacterInfo.id==Property.owner_id).join(Account).filter(Property.mod_approved==False) + query = db.session.query().select_from(Property).join(CharacterInfo, CharacterInfo.id==Property.owner_id).join(Account).filter(Property.mod_approved==False).filter(Property.privacy_option==2) else: raise Exception("Not a valid filter")