forked from MarseyWorld/MarseyWorld
hide christchurch posts in New Zealand
parent
f4f283fb70
commit
bec99392fe
|
@ -9,7 +9,7 @@ from sqlalchemy.orm import aliased, deferred, Query
|
|||
from sqlalchemy.sql import case, func, literal
|
||||
from sqlalchemy.sql.expression import not_, and_, or_
|
||||
from sqlalchemy.sql.sqltypes import *
|
||||
from flask import g, session
|
||||
from flask import g, session, request
|
||||
|
||||
from files.classes import Base
|
||||
from files.classes.casino_game import CasinoGame
|
||||
|
@ -1037,6 +1037,8 @@ class User(Base):
|
|||
return False
|
||||
if other.sub and not cls.can_see(user, other.subr):
|
||||
return False
|
||||
if 'christchurch' in other.title.lower() and request.headers.get("Cf-Ipcountry") == 'NZ':
|
||||
return False
|
||||
else:
|
||||
if other.parent_submission:
|
||||
return cls.can_see(user, other.post)
|
||||
|
|
Loading…
Reference in New Issue