@@ -131,7 +131,7 @@ def update_relationship_examples(j1, relationship_id):
131131
132132 # 2. Update with complex properties
133133 print ("2. Updating with complex properties:" )
134- complex_update = j1 .update_relationship (
134+ j1 .update_relationship (
135135 relationship_id = relationship_id ,
136136 properties = {
137137 'accessLevel' : 'admin' ,
@@ -149,7 +149,7 @@ def update_relationship_examples(j1, relationship_id):
149149
150150 # 3. Update with tags
151151 print ("3. Updating relationship tags:" )
152- tag_update = j1 .update_relationship (
152+ j1 .update_relationship (
153153 relationship_id = relationship_id ,
154154 properties = {
155155 'tag.Status' : 'active' ,
@@ -172,7 +172,7 @@ def delete_relationship_examples(j1, relationship_id):
172172
173173 # 2. Deletion with timestamp
174174 print ("2. Deleting with specific timestamp:" )
175- timestamp_delete = j1 .delete_relationship (
175+ j1 .delete_relationship (
176176 relationship_id = relationship_id ,
177177 timestamp = int (time .time ()) * 1000
178178 )
@@ -384,15 +384,17 @@ def main():
384384 try :
385385 j1 .delete_relationship (relationship_id = rel ['relationship' ]['_id' ])
386386 print (f"Cleaned up relationship: { rel ['relationship' ]['_id' ]} " )
387- except :
387+ except Exception :
388+ # Relationship may already be deleted or not exist
388389 pass
389390
390391 # Clean up entities
391392 try :
392393 j1 .delete_entity (entity_id = from_entity_id )
393394 j1 .delete_entity (entity_id = to_entity_id )
394395 print (f"Cleaned up entities" )
395- except :
396+ except Exception :
397+ # Entities may already be deleted or not exist
396398 pass
397399
398400 print ("\n ✓ All relationship management examples completed successfully!" )
0 commit comments