Skip to content

Commit

Permalink
fixed typo in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Dec 10, 2018
1 parent 1ff9925 commit dda7c65
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pydal/objects.py
Expand Up @@ -614,10 +614,9 @@ def __setitem__(self, key, value):
raise SyntaxError(
'key must have all fields from primary key: %s' %
self._primarykey)
elif str(key).isdigit():
self._db(self._id == key)\
.update(**self._filter_fields(value)) is None:
raise SyntaxError('No such record: %s' % key)
elif str(key).isdigit():
if not self._db(self._id == key).update(**self._filter_fields(value)):
raise SyntaxError('No such record: %s' % key)
else:
if isinstance(key, dict):
raise SyntaxError(
Expand Down

0 comments on commit dda7c65

Please sign in to comment.