From 172708432501d348afcfd16e2734688af6b1e18a Mon Sep 17 00:00:00 2001
From: Johannes Hoermann <j.hoermann@adito.de>
Date: Mon, 25 Nov 2019 12:51:24 +0100
Subject: [PATCH] lead import fix file upload in edit mode

---
 entity/Leadimport_entity/entityfields/bindata/valueProcess.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/entity/Leadimport_entity/entityfields/bindata/valueProcess.js b/entity/Leadimport_entity/entityfields/bindata/valueProcess.js
index 8d94fcc642..0deacd7374 100644
--- a/entity/Leadimport_entity/entityfields/bindata/valueProcess.js
+++ b/entity/Leadimport_entity/entityfields/bindata/valueProcess.js
@@ -5,10 +5,9 @@ import("system.vars");
 import("system.db");
 import("Document_lib");
 
-if (vars.get("$sys.recordstate") && vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW)
+if (vars.get("$sys.recordstate") && vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW && vars.get("$sys.recordstate") != neon.OPERATINGSTATE_EDIT)
 {
     var binMetadatas = db.getBinaryMetadata("LEADIMPORT", "IMPORTFILE", vars.get("$field.LEADIMPORTID"), false, SqlUtils.getBinariesAlias(), "");
-
     if (binMetadatas.length > 0)
     {
         // preset with data from db. This is mostly to allow just editing the other fields without uploading a file (because this field is mandatory)
-- 
GitLab