summaryrefslogtreecommitdiff
path: root/chimere/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/utils.py')
-rw-r--r--chimere/utils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/chimere/utils.py b/chimere/utils.py
index 275f107..96c41b4 100644
--- a/chimere/utils.py
+++ b/chimere/utils.py
@@ -718,6 +718,8 @@ class JsonManager(ImportManager):
for item in values:
dct = default_dct.copy()
for k in filtr:
+ if k.startswith('prefix_') or k.startswith('suffix_'):
+ continue
if k in item and item[k]:
if filtr[k] not in dct:
dct[filtr[k]] = ""
@@ -740,6 +742,15 @@ class JsonManager(ImportManager):
item['y'])
if not dct['point']:
continue
+ for k in filtr:
+ if k.startswith('prefix_') or k.startswith('suffix_'):
+ pos = k.split('_')[0]
+ key = '_'.join(k.split('_')[1:])
+ if key in dct:
+ if pos == 'prefix':
+ dct[key] = filtr[k] + dct[key]
+ else:
+ dct[key] += filtr[k]
cls = Marker
pl_id = (dct.pop('id') if 'id' in dct else dct['name']) \
+ "-" + unicode(self.importer_instance.pk)