forked from MarseyWorld/MarseyWorld
fix 500 error related to variables
parent
5520447d55
commit
dde19f7d85
|
@ -710,11 +710,11 @@ def message2(v, username):
|
||||||
@auth_required
|
@auth_required
|
||||||
def messagereply(v):
|
def messagereply(v):
|
||||||
|
|
||||||
message = request.values.get("body", "").strip()[:10000].strip()
|
body = request.values.get("body", "").strip()[:10000].strip()
|
||||||
|
|
||||||
if not message and not request.files.get("file"): return {"error": "Message is empty!"}
|
if not body and not request.files.get("file"): return {"error": "Message is empty!"}
|
||||||
|
|
||||||
if 'linkedin.com' in message: return {"error": "this domain 'linkedin.com' is banned"}
|
if 'linkedin.com' in body: return {"error": "this domain 'linkedin.com' is banned"}
|
||||||
|
|
||||||
id = int(request.values.get("parent_id"))
|
id = int(request.values.get("parent_id"))
|
||||||
parent = get_comment(id, v=v)
|
parent = get_comment(id, v=v)
|
||||||
|
@ -728,7 +728,7 @@ def messagereply(v):
|
||||||
|
|
||||||
body = body.strip()
|
body = body.strip()
|
||||||
|
|
||||||
body_html = sanitize(message)
|
body_html = sanitize(body)
|
||||||
|
|
||||||
c = Comment(author_id=v.id,
|
c = Comment(author_id=v.id,
|
||||||
parent_submission=None,
|
parent_submission=None,
|
||||||
|
|
Loading…
Reference in New Issue