From 5bb8fad332b65e9cdc3e04a18755ee6f1235a2f1 Mon Sep 17 00:00:00 2001
From: Damien <damien.burel@maarch.org>
Date: Tue, 13 Feb 2018 17:33:43 +0100
Subject: [PATCH] FIX Typist may be insert twice

---
 src/core/controllers/StoreController.php | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/core/controllers/StoreController.php b/src/core/controllers/StoreController.php
index 0293fdf1f1a..0e0ec514c27 100644
--- a/src/core/controllers/StoreController.php
+++ b/src/core/controllers/StoreController.php
@@ -272,11 +272,13 @@ class StoreController
                 'value'     => $destUser,
                 'type'      => 'string'
             ];
-            $aArgs['data'][] = [
-                'column'    => 'typist',
-                'value'     => $destUser,
-                'type'      => 'string'
-            ];
+            if (!$typistFound) {
+                $aArgs['data'][] = [
+                    'column'    => 'typist',
+                    'value'     => $destUser,
+                    'type'      => 'string'
+                ];
+            }
         }
         if ($userPrimaryEntity) {
             $destinationFound = false;
-- 
GitLab