mirror of https://github.com/MISP/PyMISP
chg: Add MISPObject._standalone type
parent
0bbfac6143
commit
aa1c95f344
|
@ -629,6 +629,7 @@ class MISPObject(AbstractMISP):
|
||||||
self.last_seen: datetime
|
self.last_seen: datetime
|
||||||
self.__fast_attribute_access: dict = defaultdict(list) # Hashtable object_relation: [attributes]
|
self.__fast_attribute_access: dict = defaultdict(list) # Hashtable object_relation: [attributes]
|
||||||
self.ObjectReference: List[MISPObjectReference] = []
|
self.ObjectReference: List[MISPObjectReference] = []
|
||||||
|
self._standalone: bool = standalone
|
||||||
self.Attribute: List[MISPObjectAttribute] = []
|
self.Attribute: List[MISPObjectAttribute] = []
|
||||||
self.SharingGroup: MISPSharingGroup
|
self.SharingGroup: MISPSharingGroup
|
||||||
self._default_attributes_parameters: dict
|
self._default_attributes_parameters: dict
|
||||||
|
@ -656,7 +657,6 @@ class MISPObject(AbstractMISP):
|
||||||
else:
|
else:
|
||||||
self.distribution = 5 # Default to inherit
|
self.distribution = 5 # Default to inherit
|
||||||
self.sharing_group_id = 0
|
self.sharing_group_id = 0
|
||||||
self._standalone = standalone
|
|
||||||
if self._standalone:
|
if self._standalone:
|
||||||
# Mark as non_jsonable because we need to add the references manually after the object(s) have been created
|
# Mark as non_jsonable because we need to add the references manually after the object(s) have been created
|
||||||
self.update_not_jsonable('ObjectReference')
|
self.update_not_jsonable('ObjectReference')
|
||||||
|
|
Loading…
Reference in New Issue