commit f46a3d6d994ec4920134ca3c3c6ea7b87234ffbe
parent d7feecfe1c3e83859b04b307134896e0ac697b99
Author: parazyd <parazyd@dyne.org>
Date: Wed, 23 Jan 2019 19:19:26 +0100
Minor cleanup.
Diffstat:
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/db.py b/db.py
@@ -116,9 +116,8 @@ def sql_update_row_where(vals, col, val, table='stories'):
def sql_insert(args):
"""
Executes an sql INSERT query where args are VALUES to insert.
-
- TODO: Make this more generic.
"""
+ # TODO: Make this more generic.
if len(args) == 11:
# Story
DB.execute("""
diff --git a/diaspora.py b/diaspora.py
@@ -89,8 +89,7 @@ def load_user(user_id):
"""
flask-security function for loading the LoginUser class for a user.
"""
- user = find_user_by_id(user_id)
- if not user:
+ if not find_user_by_id(user_id):
return None
return LoginUser(uid=user_id)