Revision 3639
Added by Aaron Marcuse-Kubitza over 12 years ago
sql_gen.py | ||
---|---|---|
436 | 436 |
|
437 | 437 |
def __setitem__(self, key, value): |
438 | 438 |
key = self._key(key) |
439 |
if value == None: value = self.db.col_info(key).default |
|
439 |
if value == None: |
|
440 |
try: value = self.db.col_info(key).default |
|
441 |
except NoUnderlyingTableException: pass # not a table column |
|
440 | 442 |
dicts.DictProxy.__setitem__(self, key, as_Col(value, name=key.name)) |
441 | 443 |
|
442 | 444 |
def _key(self, key): return as_Col(key, self.table) |
Also available in: Unified diff
sql_gen.py: ColDict.__setitem__(): Fixed bug where None value should not be replaced with column default value if column has no underlying table