Fix duplicate categories
This commit is contained in:
parent
cfd5200b29
commit
90273e96d0
|
@ -29,11 +29,11 @@ def get_combined(token):
|
||||||
issues = json.load(response)
|
issues = json.load(response)
|
||||||
for issue in issues:
|
for issue in issues:
|
||||||
_id = issue['id']
|
_id = issue['id']
|
||||||
if _id in combined:
|
if _id not in combined:
|
||||||
combined[_id]['categories'].append(q)
|
|
||||||
else:
|
|
||||||
combined[_id] = issue
|
combined[_id] = issue
|
||||||
combined[_id]['categories'] = [q]
|
combined[_id]['categories'] = []
|
||||||
|
if q not in combined[_id]['categories']:
|
||||||
|
combined[_id]['categories'].append(q)
|
||||||
timestamp=datetime.datetime.now()
|
timestamp=datetime.datetime.now()
|
||||||
print(f"{timestamp} Done processing {q}")
|
print(f"{timestamp} Done processing {q}")
|
||||||
return combined
|
return combined
|
||||||
|
|
Loading…
Reference in New Issue
Block a user