STIXProject / python-stix

A Python library for parsing, manipulating, and generating STIX content.
http://stix.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
239 stars 88 forks source link

Create multiple "contacts" in "Incident" #337

Closed ajnovice closed 6 years ago

ajnovice commented 6 years ago

Incident

contacts = fields.TypedField("Contact", InformationSource, multiple=True, key_name="contacts") Above field is specified in "Incident" class but there is no function or procedure to add multiple contacts.

Is there any workaround for it?

gtback commented 6 years ago

Thanks, @AjayS91 . Incident().contacts should behave just like a normal Python list (you can append, etc.), or you can just set it to a list of InformationSource objects. Does that not work?

ajnovice commented 6 years ago

Thanks, @gtback.It worked like charm.

gtback commented 6 years ago

Good to hear, @AjayS91 . I'm going to close this issue, since it sounds like it's working for you; if not, feel free to re-open.