Skip to content

Commit

Permalink
Merge pull request #31 from ActianCorp/hab6-pkconstraint-fix
Browse files Browse the repository at this point in the history
Fix get_primary_keys return type
  • Loading branch information
clach04 authored Feb 20, 2024
2 parents 1be79a4 + 62c75e3 commit 89119af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/sqlalchemy_ingres/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,10 @@ def get_primary_keys(self, connection, table_name, schema=None, **kw):

try:
rs = connection.exec_driver_sql(sqltext, params)

return [row[0].rstrip() for row in rs.fetchall()]

cols = [row[0].rstrip() for row in rs.fetchall()]
return {"constrained_columns": [] if cols is None else cols, "name": None}

finally:
if rs:
rs.close()
Expand Down

0 comments on commit 89119af

Please sign in to comment.