Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pymisp/mispevent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,11 @@ def add_attributes(self, object_relation: str, *attributes: Sequence[str | dict[
It is the same as calling multiple times add_attribute with the same object_relation.
'''
to_return = []

if not attributes:
logger.warning(f"No attributes provided for object relation '{object_relation}'; skipping attribute addition.")
return to_return

for attribute in attributes:
if isinstance(attribute, MISPAttribute):
a = self.add_attribute(object_relation, **attribute.to_dict())
Expand Down
Loading