Skip to content

Selecting an element before another's update is finished causes it to be updated instead

To reproduce, first add something to slow the PartialUpdateElement endpoint down in the backend, such as this:

if request.method == 'PATCH':
    import time
    time.sleep(3)

This will give you a bit more time to reproduce:

Selecting another element

  1. Annotate two elements A and B on any image
  2. With the 👆 tool, move element A or move one point of element A
  3. Before the PATCH is completed, move element B or move one point of element B
  4. Once A's patch is completed, B is shown to have A's polygon and A is not updated
  5. Once B's patch is completed, B is shown to have B's polygon again.

Selecting nothing

  1. Annotate two elements A and B on any image
  2. With the 👆 tool, move element A or move one point of element A
  3. Before the PATCH is completed:
    • Move element B or move one point of element B
    • Click on an empty space on the image to deselect element B
  4. Once A's patch is completed, A is shown to have A's polygon, as expected
  5. Trying to update A again causes HTTP 405 due to a call to PATCH /api/v1/element/undefined/

@ChloeFize sent a screencast on Slack to try to show us how to reproduce: https://teklia.slack.com/files/U01158838P2/F017G9Y70CD/deplacement_boites_bug.mp4

Edited by Erwan Rouchet