Fix bug in decorator: actually return handler

This commit is contained in:
Scoder12
2020-07-28 16:33:13 -07:00
parent 55234c2ab5
commit c08b64d3ec
+2
View File
@@ -46,6 +46,8 @@ def needs_signin(func: Callable = None, login_html: str = sign_in_snippet) -> Ca
else:
return login_html
return handler
if func is not None: # called with no options @needs_signin
return decorator(func)
else: # called with options, eg @needs_signin(loginhtml='...')