Skip to content

DataError: (psycopg2.DataError) invalid input syntax for integer: "" #998

@Turbo87

Description

@Turbo87

https://sentry.io/skylines/api/issues/604660815/

DataError: (psycopg2.DataError) invalid input syntax for integer: ""
LINE 3: WHERE users.club_id = '' ORDER BY lower(users.first_name || ...
                              ^
 [SQL: 'SELECT users.email_address AS users_email_address, users.password AS users_password, users.id AS users_id, users.first_name AS users_first_name, users.last_name AS users_last_name, users.club_id AS users_club_id, users.tracking_key AS users_tracking_key, users.tracking_delay AS users_tracking_delay, users.tracking_callsign AS users_tracking_callsign, users.created AS users_created, users.created_ip AS users_created_ip, users.login_time AS users_login_time, users.login_ip AS users_login_ip, users.recover_key AS users_recover_key, users.recover_time AS users_recover_time, users.recover_ip AS users_recover_ip, users.distance_unit AS users_distance_unit, users.speed_unit AS users_speed_unit, users.lift_unit AS users_lift_unit, users.altitude_unit AS users_altitude_unit, users.admin AS users_admin, clubs_1.id AS clubs_1_id, clubs_1.name AS clubs_1_name, clubs_1.owner_id AS clubs_1_owner_id, clubs_1.time_created AS clubs_1_time_created, clubs_1.website AS clubs_1_website \nFROM users LEFT OUTER JOIN clubs AS clubs_1 ON clubs_1.id = users.club_id \nWHERE users.club_id = %(club_id_1)s ORDER BY lower(users.first_name || %(first_name_1)s || users.last_name)'] [parameters: {'first_name_1': u' ', 'club_id_1': u''}] (Background on this error at: http://sqlalche.me/e/9h9h)
(12 additional frame(s) were not displayed)
...
  File "sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "sqlalchemy/util/compat.py", line 265, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "sqlalchemy/engine/default.py", line 509, in do_execute
    cursor.execute(statement, parameters)

DataError: (psycopg2.DataError) invalid input syntax for integer: ""
LINE 3: WHERE users.club_id = '' ORDER BY lower(users.first_name || ...
                              ^
 [SQL: 'SELECT users.email_address AS users_email_address, users.password AS users_password, users.id AS users_id, users.first_name AS users_first_name, users.last_name AS users_last_name, users.club_id AS users_club_id, users.tracking_key AS users_tracking_key, users.tracking_delay AS users_tracking_delay, users.tracking_callsign AS users_tracking_callsign, users.created AS users_created, users.created_ip AS users_created_ip, users.login_time AS users_login_time, users.login_ip AS users_login_ip, users.recover_key AS users_recover_key, users.recover_time AS users_recover_time, users.recover_ip AS users_recover_ip, users.distance_unit AS users_distance_unit, users.speed_unit AS users_speed_unit, users.lift_unit AS users_lift_unit, users.altitude_unit AS users_altitude_unit, users.admin AS users_admin, clubs_1.id AS clubs_1_id, clubs_1.name AS clubs_1_name, clubs_1.owner_id AS clubs_1_owner_id, clubs_1.time_created AS clubs_1_time_created, clubs_1.website AS clubs_1_website \nFROM users LEFT OUTER JOIN clubs AS clubs_1 ON clubs_1.id = users.club_id \nWHERE users.club_id = %(club_id_1)s ORDER BY lower(users.first_name || %(first_name_1)s || users.last_name)'] [parameters: {'first_name_1': u' ', 'club_id_1': u''}] (Background on this error at: http://sqlalche.me/e/9h9h)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions