From 6d0ffd4a1fbd081240fdd0c721afaea9be23a1ac Mon Sep 17 00:00:00 2001 From: Vijay Prakash P J Date: Tue, 18 Feb 2020 10:44:07 +0100 Subject: [PATCH] Fixed comparison of Name property with CustomerKey Bug #119 - Logic to get customer key of the data extension based on its name fails due to incorrect comparison logic --- FuelSDK/objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FuelSDK/objects.py b/FuelSDK/objects.py index 0b5eebb..0744b51 100644 --- a/FuelSDK/objects.py +++ b/FuelSDK/objects.py @@ -382,7 +382,7 @@ def getCustomerKey(self): de = ET_DataExtension() de.auth_stub = self.auth_stub de.props = ["Name","CustomerKey"] - de.search_filter = {'Property' : 'CustomerKey','SimpleOperator' : 'equals','Value' : self.Name} + de.search_filter = {'Property' : 'Name','SimpleOperator' : 'equals','Value' : self.Name} getResponse = de.get() if getResponse.status and len(getResponse.results) == 1 and 'CustomerKey' in getResponse.results[0]: self.CustomerKey = getResponse.results[0]['CustomerKey']