From 8d2809b0664c86e074b0ecc5287a1fa39b7590ba Mon Sep 17 00:00:00 2001
From: "s.pongratz" <s.pongratz@adito.de>
Date: Wed, 24 Nov 2021 11:23:58 +0100
Subject: [PATCH] RevertFalseBugfixLiquibaseMailbridge

---
 process/StandardObject_lib/process.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/process/StandardObject_lib/process.js b/process/StandardObject_lib/process.js
index 106239747a..fbc566801e 100644
--- a/process/StandardObject_lib/process.js
+++ b/process/StandardObject_lib/process.js
@@ -5,7 +5,6 @@ import("Keyword_lib");
 import("KeywordRegistry_basic");
 import("Contact_lib");
 import("Communication_lib");
-import("Context_lib");
 
 function StandardObject (pObjectType, pObjectID, pScopeType, pScopeID) {
     if (!this._isValidType("object", pObjectType))
@@ -247,7 +246,7 @@ StandardObject.prototype._getCompanyStandardAddress = function (pOrganisationID)
  * 
  * @param {String} pObjectRowId The rowid of the communication to check.
  * @param {String} pMediumCategory Medium category to check.
- * @param {String} pObjectType=CurrentContextId (Optional) The type of the rowid
+ * @param {String} pObjectType=Contact (Optional) The type of the rowid
  * @return {Boolean} If the contact already has a standard addres with the given
  * medium category.
  */
@@ -259,7 +258,7 @@ StandardObject.prototype._hasStandardCommunicationByMedium = function (pObjectRo
         .leftJoin("AB_KEYWORD_ATTRIBUTERELATION", "AB_KEYWORD_ENTRY_ID = AB_KEYWORD_ENTRYID")
         .where("ISSTANDARD = 1")
         .and("COMMUNICATION.OBJECT_ROWID", pObjectRowId)
-        .and("COMMUNICATION.OBJECT_TYPE", (pObjectType ? pObjectType : ContextUtils.getCurrentContextId()))
+        .and("COMMUNICATION.OBJECT_TYPE", (pObjectType ? pObjectType : CommUtil.defaultObjectType()))
         .and("AB_KEYWORD_ENTRY.KEYID", CommUtil.getMediumIdsByCategory(pMediumCategory), SqlBuilder.IN())
         .arrayColumn()
         .indexOf(pMediumCategory) !== -1;
-- 
GitLab