Commit 9e919592 authored by Mathieu Giraud's avatar Mathieu Giraud

analysis.py: get info or tag from one clone

parent 3d4f531a
......@@ -22,3 +22,17 @@ class Analysis(VidjilJson):
for clone in self.d['clones']:
self.clones[clone['id']] = clone
def info_of_clone(self, w):
if w.d['id'] in self.clones:
return self.clones[w.d['id']]
return None
def tag_of_clone(self, w):
i = self.info_of_clone(w)
if i:
try:
return i['tag']
except:
return None
return None
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment