git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afa0399
)
ensure that a column exists in the table before attempting to filter on it
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Sun, 10 Mar 2013 03:03:28 +0000
(22:03 -0500)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Sun, 10 Mar 2013 03:03:28 +0000
(22:03 -0500)
PLC/Storage/AlchemyObject.py
patch
|
blob
|
history
diff --git
a/PLC/Storage/AlchemyObject.py
b/PLC/Storage/AlchemyObject.py
index
ed9eca8
..
88b505e
100644
(file)
--- a/
PLC/Storage/AlchemyObject.py
+++ b/
PLC/Storage/AlchemyObject.py
@@
-88,7
+88,9
@@
class AlchemyObj(Record):
for (field, value) in filter.items():
if isinstance(value, list):
if value:
- constraints.append(table.columns.get(field).in_(value))
+ column = table.columns.get(field)
+ if isinstance(column, Column):
+ constraints.append(column.in_(value))
else:
constraints.append(table.columns.get(field) == value)
if not constraints: