mirror of https://github.com/MISP/PyMISP
Ensure that keys are sorted in the returned `_to_feed()` dictionary
This allows for better deterministic feed output generation.pull/837/head
parent
bb9f053b68
commit
49b6a45502
|
@ -231,7 +231,7 @@ class AbstractMISP(MutableMapping, MISPFileCache, metaclass=ABCMeta):
|
|||
if hasattr(self, '_set_default') and callable(self._set_default): # type: ignore
|
||||
self._set_default() # type: ignore
|
||||
to_return = {}
|
||||
for field in self._fields_for_feed:
|
||||
for field in sorted(self._fields_for_feed):
|
||||
if getattr(self, field, None) is not None:
|
||||
if field in ['timestamp', 'publish_timestamp']:
|
||||
to_return[field] = self._datetime_to_timestamp(getattr(self, field))
|
||||
|
|
Loading…
Reference in New Issue