From 361f801f50df5bb92ffb001c049b0e45186f26a1 Mon Sep 17 00:00:00 2001
From: Julien Ortet <julien@le-filament.com>
Date: Tue, 27 Feb 2024 15:01:50 +0100
Subject: [PATCH] Customer review

---
 tools/key_file.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/key_file.py b/tools/key_file.py
index 7cdb930..1935b23 100644
--- a/tools/key_file.py
+++ b/tools/key_file.py
@@ -111,6 +111,12 @@ class RepartitionKeyEntryFile:
         if self.data:
             counter_list_from_file = self.data[0].split(";")[1:]
 
+            if len(counter_list_from_file) != len(set(counter_list_from_file)):
+                return {
+                    "check": False,
+                    f"message": "Des numéros de PRM apparaissent plusieurs fois"
+                }
+
             if sorted(self.operation_counter_list) == sorted(counter_list_from_file):
                 return {"check": True, "message": ""}
             else:
-- 
GitLab