Skip to content

Commit

Permalink
new: Allow to force the timestamps in to_dict/to_json, even if a chan…
Browse files Browse the repository at this point in the history
…ge was made
  • Loading branch information
Rafiot committed Aug 15, 2022
1 parent 3ca8717 commit 289ce47
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pymisp/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,14 @@ def __iter__(self):
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
Expand Down

0 comments on commit 289ce47

Please sign in to comment.