summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-12-22 20:19:25 +0200
committerAlon Levy <alon@pobox.com>2014-12-22 20:19:25 +0200
commit5bbc3d090fda064fedf11ba2a545255ea6401e8b (patch)
treef6dc8313c4163848bd27fa78ac3c8a004866552c /src
parent55d2bca3b3d0fad84fc84c3c690c28f95b30c66e (diff)
server/neo4j_util: cover up client sending us unrequired properties for link name - name & __type; need to fix client but good enough for now
Diffstat (limited to 'src')
-rw-r--r--src/server/neo4j_util.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/neo4j_util.py b/src/server/neo4j_util.py
index 9ca97fae..46672cfa 100644
--- a/src/server/neo4j_util.py
+++ b/src/server/neo4j_util.py
@@ -216,6 +216,14 @@ def gen_query_create_from_link_map(link_map, input_to_DB_property_map=lambda _:
del prop_dict['__dst_id']
del prop_dict['__src_id']
+ # TODO - somewhere else?
+ if '__type' in prop_dict:
+ console.log('warning: client is sending us __type link property, it should not')
+ if 'name' in prop_dict:
+ console.log('warning: client is sending us name link property, it should not')
+ del prop_dict['__type']
+ del prop_dict['name']
+
q_params = {'src': { 'id': src_id} ,
'dst': { 'id': dst_id} ,
'link_attr' : input_to_DB_property_map(prop_dict)}