Advertisement
Guest User

Untitled

a guest
Feb 14th, 2020
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.43 KB | None | 0 0
  1.             if (origin.toJSON()['filtered'] and destination.toJSON()['filtered']):
  2.                 continue
  3.             elif origin.toJSON()["filtered"]:
  4.                 edges.append({"source": destination.getId(),
  5.                               "target": destination.getId()})
  6.             elif (destination.toJSON()["filtered"]):
  7.                 edges.append({"source": origin.getId(),
  8.                               "target":  origin.getId()})
  9.             else:
  10.                 edges.append({"source": origin.getId(),
  11.                               "target": destination.getId()})
  12.  
  13.  
  14.  
  15. #SIMPLEEEE
  16.  
  17. if(origin.toJSON()['filtered'] and destination.toJSON()['filtered']):
  18.                 continue
  19.             elif origin.toJSON()["filtered"]:
  20.                 edges.append({"source": {"name": destination.getId(), 'searched': destination.element()['searched']},
  21.                               "target": {"name": destination.getId(), 'searched': destination.element()['searched']}})
  22.             elif (destination.toJSON()["filtered"]):
  23.                 edges.append({"source":  { "name" : origin.getId(), 'searched': origin.element()['searched']}, "target":{ "name" : origin.getId(), 'searched': origin.element()['searched']}})
  24.             else:
  25.                 edges.append({"source":  { "name" : origin.getId(), 'searched': origin.element()['searched']}, "target":{ "name" : destination.getId(), 'searched': destination.element()['searched']}})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement