Skip to content

Commit 0c5c41f

Browse files
committed
Added None check for association_type_ in to_obj()
1 parent 8168ad3 commit 0c5c41f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cybox/core/associated_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, type_=None, association_type_=None, defined_object=None):
2020

2121
def to_obj(self):
2222
obj = super(AssociatedObject, self).to_obj(core_binding.AssociatedObjectType())
23-
obj.set_Association_Type(self.association_type_.to_obj())
23+
if self.assocation_type is not None : obj.set_Association_Type(self.association_type_.to_obj())
2424
return obj
2525

2626
def to_dict(self):

0 commit comments

Comments
 (0)