You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/chad/kode/alexandria/librarian/api.py", line 314, in edit_book
form.illustrators.data)
File "/home/chad/kode/alexandria/librarian/api.py", line 242, in edit_contrib
db.session.add(contribution)
File "/home/chad/.virtualenvs/alexandria/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 157, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/home/chad/.virtualenvs/alexandria/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1677, in add
self._save_or_update_state(state)
File "/home/chad/.virtualenvs/alexandria/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1696, in _save_or_update_state
self._save_or_update_impl(st_)
File "/home/chad/.virtualenvs/alexandria/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1995, in _save_or_update_impl
self._update_impl(state)
File "/home/chad/.virtualenvs/alexandria/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1984, in _update_impl
self.identity_map.add(state)
File "/home/chad/.virtualenvs/alexandria/local/lib/python2.7/site-packages/sqlalchemy/orm/identity.py", line 134, in add
orm_util.state_str(state), state.key))
InvalidRequestError: Can't attach instance <Role at 0x7fc7894f4ad0>; another instance with key (<class 'librarian.models.Role'>, (2L,)) is already present in this session.
Try doing this in a unit test: Have two books which will be edited to have an Illustrator modified. Editing the second book should throw this error.
In the meantime, a workaround is restarting the server. :(
The text was updated successfully, but these errors were encountered:
Try doing this in a unit test: Have two books which will be edited to have an Illustrator modified. Editing the second book should throw this error.
In the meantime, a workaround is restarting the server. :(
The text was updated successfully, but these errors were encountered: