Skip to content

Commit

Permalink
Simplify check for existing user in database in api_handle_add method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmichaelward committed Apr 9, 2020
1 parent 4d11238 commit 5f06141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_bgg_json(url):
def api_handle_add(username: str):
user = db.get_user(username)

if len(user) == 1:
if user:
return {
"id": user[0]['bgg_id'],
"username": user[0]['username'],
Expand Down

0 comments on commit 5f06141

Please sign in to comment.