From c1e6bf36e9e1737d519e53d36fa934e9ba51b89a Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 21 Feb 2012 03:07:01 +0530 Subject: [PATCH] dont set replace to empty string --- utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.py b/utils.py index 9f48ada..4b71a7c 100644 --- a/utils.py +++ b/utils.py @@ -113,6 +113,8 @@ def replacePlaceNames(old, new, operator="", start=0, end=100): for m in matchedPlaces: value = m['value'] new_value = value.replace(old, new).strip() + if new_value = '': + continue ret.append(api.editAnnotation({ 'id': m['id'], 'in': m['in'],