fix users multiple imports#62
Conversation
* without the no_autoflush the first() method call initiates a autoflush which calls the session.flush() method. this flushes the models in the session. this prevents then that other packages could use the pre_commit hook to collect all not flushed models and possible index them.
|
Why add |
|
this was a try to fix a bug which uni münster encountered, described here: inveniosoftware/invenio-users-resources#144 it would be better to add the real problem is that the autoflush flushes the info to the database which prevents https://github.com/inveniosoftware/invenio-users-resources/blob/19433930ac9581b024db71136a643833255d99af/invenio_users_resources/records/hooks.py#L27 and https://github.com/inveniosoftware/invenio-users-resources/blob/19433930ac9581b024db71136a643833255d99af/invenio_users_resources/records/hooks.py#L61 from really doing what they meant to do. because flush, removes entry from the therefore all |
|
I was working on User-Resources and had a "situation" with the session not behaving correctly. Somehow, my brain connected the dots and remembered you mentioned this some time ago 😂 |
|
i added it to the v13 board, so we can discuss this PR. maybe also in Hamburg |
|
Will this fix/a similar one be part of v13? |
this should fix inveniosoftware/invenio-users-resources#144