From bdbd665c99421c73fdc1b444792d570e16a70d6f Mon Sep 17 00:00:00 2001
From: Blanche Miret <bmiret@teklia.com>
Date: Thu, 8 Jul 2021 14:36:02 +0200
Subject: [PATCH] Sort missing_slugs whne raising MissingTyperError

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

diff --git a/arkindex_worker/worker/element.py b/arkindex_worker/worker/element.py
index 32b96949..f751b19b 100644
--- a/arkindex_worker/worker/element.py
+++ b/arkindex_worker/worker/element.py
@@ -31,7 +31,7 @@ class ElementMixin(object):
 
         if missing_slugs:
             raise MissingTypeError(
-                f'Element type(s) {", ".join(missing_slugs)} were not found in the {corpus["name"]} corpus ({corpus["id"]}).'
+                f'Element type(s) {", ".join(sorted(missing_slugs))} were not found in the {corpus["name"]} corpus ({corpus["id"]}).'
             )
 
         return True
-- 
GitLab