Add fallback to None if no __values__ method
This commit is contained in:
parent
a16dd46874
commit
95df8f8b1b
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ class Database():
|
||||||
sql += ", ".join(['?' for c in table.columns if c != table.key])
|
sql += ", ".join(['?' for c in table.columns if c != table.key])
|
||||||
sql += ')'
|
sql += ')'
|
||||||
|
|
||||||
fn = getattr(obj, '__values__')
|
fn = getattr(obj, '__values__', None)
|
||||||
|
|
||||||
if fn is not None:
|
if fn is not None:
|
||||||
values = fn()
|
values = fn()
|
||||||
|
|
Loading…
Add table
Reference in a new issue