chg: [analyst-data] Make sure to include note_type_name

pull/1205/head
Sami Mokaddem 2024-04-29 14:39:09 +02:00
parent 34f22aa30d
commit 807c59cc05
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 2 additions and 1 deletions

View File

@ -2382,7 +2382,7 @@ class MISPDecayingModel(AbstractMISP):
class MISPAnalystData(AbstractMISP): class MISPAnalystData(AbstractMISP):
_fields_for_feed: set[str] = {'uuid', 'object_uuid', 'object_type', 'authors', _fields_for_feed: set[str] = {'uuid', 'object_uuid', 'object_type', 'authors',
'created', 'distribution', 'sharing_group_id', } 'created', 'distribution', 'sharing_group_id', 'note_type_name'}
valid_object_type = {'Attribute', 'Event', 'EventReport', 'GalaxyCluster', 'Galaxy', valid_object_type = {'Attribute', 'Event', 'EventReport', 'GalaxyCluster', 'Galaxy',
'Object', 'Note', 'Opinion', 'Relationship', 'Organisation', 'Object', 'Note', 'Opinion', 'Relationship', 'Organisation',
@ -2417,6 +2417,7 @@ class MISPAnalystData(AbstractMISP):
self.created: float | int | datetime self.created: float | int | datetime
self.modified: float | int | datetime self.modified: float | int | datetime
self.SharingGroup: MISPSharingGroup self.SharingGroup: MISPSharingGroup
self.note_type_name = self.classObjectType
def from_dict(self, **kwargs) -> None: # type: ignore[no-untyped-def] def from_dict(self, **kwargs) -> None: # type: ignore[no-untyped-def]
if 'Note' in kwargs: if 'Note' in kwargs: