chg: make the publish_timestamp a string, as per specs

pull/1132/head
Raphaël Vinot 2024-01-09 12:40:09 +01:00
parent af741ce3b8
commit 1d24c1b3ce
1 changed files with 2 additions and 2 deletions

View File

@ -1883,9 +1883,9 @@ class MISPEvent(AbstractMISP):
self.date = self.date.date()
to_return['date'] = self.date.isoformat()
if to_return.get('publish_timestamp'):
to_return['publish_timestamp'] = self._datetime_to_timestamp(self.publish_timestamp)
to_return['publish_timestamp'] = str(self._datetime_to_timestamp(self.publish_timestamp))
if to_return.get('sighting_timestamp'):
to_return['sighting_timestamp'] = self._datetime_to_timestamp(self.sighting_timestamp)
to_return['sighting_timestamp'] = str(self._datetime_to_timestamp(self.sighting_timestamp))
return to_return