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
For a model extending LockableModelAdmin, I load the admin change form page. Then I open the same change form in a second tab. The second tab shows "You cannot edit this object". Now when attempting to save the first tab, you also see "You cannot edit this object". From then on I am fully locked out until the timeout, regardless of what I do.
Given that the lock token is stored on the session which is shared between tabs, probably the second tab should just renew the lock taken out by the first tab, even though this would allow you to overwrite on your own work.
I believe that the issue occurs because lock_for_session() deletes the reference to the lock out of the session dictionary before it attempts to lock. Locking then fails, leaving us without the original lock token.
Thanks for the useful package! Excellent docs too!
The text was updated successfully, but these errors were encountered:
BenSturmfels
changed the title
Opening a duplicate tab of LockableModelAdmin leaves you completely locked out
Opening a duplicate tab of LockableModelAdmin leaves me completely locked out
Feb 4, 2020
Description
For a model extending LockableModelAdmin, I load the admin change form page. Then I open the same change form in a second tab. The second tab shows "You cannot edit this object". Now when attempting to save the first tab, you also see "You cannot edit this object". From then on I am fully locked out until the timeout, regardless of what I do.
Given that the lock token is stored on the session which is shared between tabs, probably the second tab should just renew the lock taken out by the first tab, even though this would allow you to overwrite on your own work.
I believe that the issue occurs because
lock_for_session()
deletes the reference to the lock out of the session dictionary before it attempts to lock. Locking then fails, leaving us without the original lock token.Thanks for the useful package! Excellent docs too!
The text was updated successfully, but these errors were encountered: