mirror of https://github.com/MISP/PyMISP
new: Allow to force the timestamps in to_dict/to_json, even if a change was made
parent
3ca8717e6c
commit
289ce47d64
|
@ -280,6 +280,14 @@ class AbstractMISP(MutableMapping, MISPFileCache, metaclass=ABCMeta):
|
|||
def __len__(self) -> int:
|
||||
return len([k for k in self.__dict__.keys() if not (k[0] == '_' or k in self.__not_jsonable)])
|
||||
|
||||
@property
|
||||
def force_timestamp(self) -> bool:
|
||||
return self.__force_timestamps
|
||||
|
||||
@force_timestamp.setter
|
||||
def force_timestamp(self, force: bool):
|
||||
self.__force_timestamps = force
|
||||
|
||||
@property
|
||||
def edited(self) -> bool:
|
||||
"""Recursively check if an object has been edited and update the flag accordingly
|
||||
|
|
Loading…
Reference in New Issue