Commit 9b19fff4 authored by Serge S. Koval's avatar Serge S. Koval

Small fix

parent 7b7064fe
...@@ -33,6 +33,7 @@ def get_primary_key(model): ...@@ -33,6 +33,7 @@ def get_primary_key(model):
else: else:
pks.append(p.key) pks.append(p.key)
else: else:
if hasattr(p, 'columns'):
for c in p.columns: for c in p.columns:
if c.primary_key: if c.primary_key:
pks.append(p.key) pks.append(p.key)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment