error should be returned in todict

This commit is contained in:
Emmanuel Garette 2019-12-08 08:15:47 +01:00
parent d958b9dfad
commit 4e04082cec
2 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@ def delete_session(session_id,
cursor.close()
class Storage(object):
class Storage:
__slots__ = ('_conn', '_cursor', 'persistent', 'session_id', 'session_name', 'created')
storage = 'sqlite3'

View File

@ -873,7 +873,7 @@ class TiramisuDict:
else:
raise ValueError(_('only multi option can have action "add", but "{}" is not a multi').format(path))
else:
raise ValueError(_('unknown action'))
raise ValueError(_('unknown action {}').format(update['action']))
except ValueError as err:
updates_status.setdefault(path, {})[index] = [err]
if warns != []:
@ -897,7 +897,7 @@ class TiramisuDict:
values = {'updates': list_keys(old_model, new_model, order, updates_status),
'model': new_model}
else:
values = None
values = updates_status
return values
def todict(self,