From c521ab438a506c7197f85f99edc16cf794ed9c45 Mon Sep 17 00:00:00 2001 From: Erwan Rouchet <rouchet@teklia.com> Date: Tue, 15 Feb 2022 15:56:10 +0100 Subject: [PATCH] Add __str__ and __repr__ on WorkerConfiguration --- arkindex/dataimport/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arkindex/dataimport/models.py b/arkindex/dataimport/models.py index 13c0c2ae82..94fe88d5f4 100644 --- a/arkindex/dataimport/models.py +++ b/arkindex/dataimport/models.py @@ -620,6 +620,12 @@ class WorkerConfiguration(IndexableModel): related_name='configurations', ) + def __str__(self): + return self.name + + def __repr__(self): + return f'<WorkerConfiguration {self.name!r} ({self.id})>' + class Meta: unique_together = ( ('worker', 'configuration_hash'), -- GitLab