diff --git a/services/web/project/__init__.py b/services/web/project/__init__.py index ddc5a7f..825326a 100644 --- a/services/web/project/__init__.py +++ b/services/web/project/__init__.py @@ -383,14 +383,14 @@ def complete_register(): password= data['password'] country= data['country'] - FIND_USERNAME= f"SELECT * FROM members WHERE username::text = '{username}' " + FIND_USERNAME= f"SELECT id FROM members WHERE username::text = '{username}' " print(FIND_USERNAME) with connection: with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor: cursor.execute(FIND_USERNAME) user_search = cursor.fetchall() print(user_search) - print(user_search[0]) + print(user_search[0][0]) if user_search[0]: return jsonify({'status': "DUPLICATE",'message': 'Error - use another username'}), 200