From 16c5a31ededea51750c809cd6b618ce6fa9da4af Mon Sep 17 00:00:00 2001
From: manonBlanco <blanco@teklia.com>
Date: Wed, 23 Aug 2023 16:13:29 +0200
Subject: [PATCH] Use `is_read_only` to allow/forbid to update Worker Activity

---
 arkindex_worker/worker/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arkindex_worker/worker/__init__.py b/arkindex_worker/worker/__init__.py
index 2ea54f18..fa98a847 100644
--- a/arkindex_worker/worker/__init__.py
+++ b/arkindex_worker/worker/__init__.py
@@ -136,7 +136,7 @@ class ElementsWorker(
         Whether or not WorkerActivity support has been enabled on the DataImport
         used to run this worker.
         """
-        if self.args.dev:
+        if self.is_read_only:
             return False
         assert (
             self.process_information
-- 
GitLab