forked from platypush/platypush
Throw an assertion error when on_duplicate_update is specified on db.insert with no key_columns
This commit is contained in:
parent
0143dac216
commit
4682fb4210
1 changed files with 5 additions and 0 deletions
|
@ -292,6 +292,11 @@ class DbPlugin(Plugin):
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if on_duplicate_update:
|
||||||
|
assert (
|
||||||
|
key_columns
|
||||||
|
), 'on_duplicate_update requires key_columns to be specified'
|
||||||
|
|
||||||
if key_columns is None:
|
if key_columns is None:
|
||||||
key_columns = []
|
key_columns = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue