SHARE
TWEET

Untitled

a guest Feb 14th, 2020 140 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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']}})
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top