From 1565f2973e7c6ee310197ea0ba44ce5995c525ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Villar?= Date: Thu, 13 Jun 2019 11:56:57 +0200 Subject: [PATCH] Added support for custom owner on Case creation (#118) * Added support for custom owner on Case creation * added support to create CaseTask objects with specific ID --- thehive4py/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/thehive4py/models.py b/thehive4py/models.py index 1f55eb87..5c9d8363 100644 --- a/thehive4py/models.py +++ b/thehive4py/models.py @@ -78,7 +78,8 @@ def __init__(self, **attributes): 'metrics': {}, 'customFields': {}, 'tasks': [], - 'template': None + 'template': None, + 'owner' : None } if attributes.get('json', False): @@ -98,6 +99,7 @@ def __init__(self, **attributes): self.metrics = attributes.get('metrics', defaults['metrics']) self.customFields = attributes.get('customFields', defaults['customFields']) self.template = attributes.get('template', defaults['template']) + self.owner = attributes.get('owner', defaults['owner']) tasks = attributes.get('tasks', defaults['tasks']) self.tasks = [] @@ -204,7 +206,8 @@ class CaseTask(JSONSerializable): def __init__(self, **attributes): if attributes.get('json', False): attributes = attributes['json'] - + + self.id = attributes.get('id', None) self.title = attributes.get('title', None) self.status = attributes.get('status', 'Waiting') self.flag = attributes.get('flag', False)