From bf0cb10e862bd052204eeaa13cd1e1220405cb80 Mon Sep 17 00:00:00 2001 From: yashodha Date: Thu, 23 Jun 2016 15:48:11 +0530 Subject: [PATCH] CRM-18984 : Can't delete an import/export mapping ---------------------------------------- * CRM-18984: Can't delete an import/export mapping https://issues.civicrm.org/jira/browse/CRM-18984 Signed-off-by: Nathan Brettell --- CRM/Core/BAO/Mapping.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index e3ca41e98b..791a04557c 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -74,10 +74,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { // delete from mapping_field table $mappingField = new CRM_Core_DAO_MappingField(); $mappingField->mapping_id = $id; - $mappingField->find(); - while ($mappingField->fetch()) { - $mappingField->delete(); - } + $mappingField->delete(); // delete from mapping table $mapping = new CRM_Core_DAO_Mapping(); -- 2.25.1