diff --git a/database.py b/database.py index 3dc9ade..8b1dde5 100644 --- a/database.py +++ b/database.py @@ -1199,7 +1199,8 @@ def validateChallenge(challenge_object, bypass_length=False, bypass_cost=False): #user must exist - author = User.get(name=result.get('author')) + author = User.get(name=result.get('author','')) + if author == None: result["fail_reason"] += f"; author '{challenge_object.get('author')}' doesn't exist (are they registered/in the DB)" return result