Stale read when updating worker activities after a task fails

Teklia Bot
2025-11-25T14:28:59Z

Sentry Issue: [ARKINDEX-BACKEND-2ZD](https://teklia.sentry.io/issues/7062428740/?referrer=gitlab_integration) ``` KeyError: 'worker_run' File "django/db/models/fields/related_descriptors.py", line 243, in __get__ rel_obj = self.fi...

Sentry Issue: ARKINDEX-BACKEND-2ZD

KeyError: 'worker_run'
  File "django/db/models/fields/related_descriptors.py", line 243, in __get__
    rel_obj = self.field.get_cached_value(instance)
  File "django/db/models/fields/mixins.py", line 37, in get_cached_value
    return instance._state.fields_cache[self.cache_name]

WorkerRun.DoesNotExist: WorkerRun matching query does not exist.
(13 additional frame(s) were not displayed)
...
  File "arkindex/ponos/serializers.py", line 178, in update