Permalink
Browse files

fixing major error with updating nodes, thanks kyle

  • Loading branch information...
trhowe committed Apr 23, 2011
1 parent 2324e26 commit de3ae0cc25f68a9e953dd14e9abfdf96d663e97a
Showing with 9 additions and 6 deletions.
  1. +1 −1 .gitignore
  2. +7 −4 agamemnon/__init__.py
  3. +1 −1 setup.py
View
@@ -3,4 +3,4 @@ agamemnon.egg-info
build
dist
nose-1.0.0-py2.6.egg
-
+*.pyc
View
@@ -288,16 +288,19 @@ def save_node(self, node):
for key in outbound_results.keys():
target = outbound_results[key]
target_key = ENDPOINT_NAME_TEMPLATE %(target['target__type'], target['target__key'])
- self.insert(OUTBOUND_RELATIONSHIP_CF, source_key, outbound_columns, key)
- self.insert(INBOUND_RELATIONSHIP_CF, target_key, outbound_columns, key)
+ target.update(outbound_columns)
+ self.insert(OUTBOUND_RELATIONSHIP_CF, source_key, target, key)
+ self.insert(INBOUND_RELATIONSHIP_CF, target_key, target, key)
inbound_columns = {'target__type': node.type.encode('utf-8'), 'target__key': node.key.encode('utf-8')}
for attribute_key in node.attributes.keys():
inbound_columns['target__%s' % attribute_key] = node_attributes[attribute_key]
for key in inbound_results.keys():
source = inbound_results[key]
source_key = ENDPOINT_NAME_TEMPLATE %(source['source__type'], source['source__key'])
- self.insert(OUTBOUND_RELATIONSHIP_CF, source_key, inbound_columns, key)
- self.insert(INBOUND_RELATIONSHIP_CF, target_key, inbound_columns, key)
+ source.update(inbound_columns)
+ source.update(inbound_columns)
+ self.insert(OUTBOUND_RELATIONSHIP_CF, source_key, source, key)
+ self.insert(INBOUND_RELATIONSHIP_CF, target_key, source, key)
self.insert(node.type, node.key, node.attributes)
def get_node(self, type, key):
View
@@ -10,7 +10,7 @@
tests_requires = requires + ['nose', 'mock']
setup(name='agamemnon',
- version='0.1.3.2',
+ version='0.1.3.3',
description='A graph database built on top of cassandra',
long_description=README + "\n\n" + CHANGES,
classifiers=[

0 comments on commit de3ae0c

Please sign in to comment.