fix: [ocr] fix None copy date

ocr
terrtia 2024-04-25 14:29:30 +02:00
parent 20c98de0fa
commit 42ef6fb2e5
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 2 additions and 1 deletions

View File

@ -133,7 +133,8 @@ class AbstractDaterangeObject(AbstractObject, ABC):
if first_seen and last_seen:
for date in Date.get_daterange(first_seen, last_seen):
nb = r_object.zscore(f'{obj_type}:date:{date}', self.id)
r_object.zincrby(f'{self.type}:date:{date}', nb, self.id)
if nb:
r_object.zincrby(f'{self.type}:date:{date}', nb, self.id)
update_obj_date(first_seen, self.type)
update_obj_date(last_seen, self.type)
self._add_create()