forked from MarseyWorld/MarseyWorld
dfssdf
parent
f424b52671
commit
31e4214620
|
@ -28,6 +28,10 @@ def get_id(username, v=None, graceful=False):
|
|||
|
||||
def get_user(username, v=None, graceful=False):
|
||||
|
||||
if not username:
|
||||
if not graceful: abort(404)
|
||||
else: return None
|
||||
|
||||
username = username.replace('\\', '')
|
||||
username = username.replace('_', '\_')
|
||||
username = username.replace('%', '')
|
||||
|
@ -42,10 +46,8 @@ def get_user(username, v=None, graceful=False):
|
|||
).first()
|
||||
|
||||
if not user:
|
||||
if not graceful:
|
||||
abort(404)
|
||||
else:
|
||||
return None
|
||||
if not graceful: abort(404)
|
||||
else: return None
|
||||
|
||||
if v:
|
||||
block = g.db.query(UserBlock).filter(
|
||||
|
|
Loading…
Reference in New Issue