Fix lots of potential stale reads in Element.add_parent and .remove_child
Part 1/2 of #881 (closed), resolves ARKINDEX-BACKEND-SD
This fixes six possible stale reads in both add_parent
and remove_child
, so this affects at least CreateElement
, CreateElementParent
, DestroyElementParent
and the move_element
RQ task. There still are more elsewhere :D
See https://gitlab.com/arkindex/backend/-/issues/881#note_714675726 for details
Edited by Erwan Rouchet