Fixing problem where the uids have automatically got a random suffix which prevented a correct update detection

This commit is contained in:
Patrick Müller 2021-03-11 20:24:40 +01:00
parent a684d540e5
commit df73c0164b

View File

@ -84,10 +84,14 @@ def crawl():
if not event.uid in evtIdx.keys(): if not event.uid in evtIdx.keys():
# Event not known yet # Event not known yet
uid = event.uid uid = event.uid
# Remove random last part of uid
uid = uid[:(uid.rindex('_'))]
event.uid = uid + '---0' event.uid = uid + '---0'
evtIdx[uid] = 1 evtIdx[uid] = 1
else: else:
uid = event.uid uid = event.uid
# Remove random last part of uid
uid = uid[:(uid.rindex('_'))]
event.uid = uid + '---' + str(evtIdx[uid]) event.uid = uid + '---' + str(evtIdx[uid])
evtIdx[uid] += 1 evtIdx[uid] += 1
# Remove timezones # Remove timezones