Skip to content

Commit a7cea81

Browse files
authored
Merge pull request #74 from seatable/trigger-workflow-enable-initiator
trigger workflow enable initiator
2 parents 94f9077 + 46dd823 commit a7cea81

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

seatable_api/main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -924,20 +924,21 @@ def send_toast_notification(self, user_id, msg, toast_type='success'):
924924
}
925925
}, headers=self.headers)
926926

927-
def add_workflow_task(self, workflow_token, row_data, link_rows=None, new_linked_rows=None):
927+
def add_workflow_task(self, workflow_token, row_data, initiator=None, link_rows=None, new_linked_rows=None):
928928
url = self._add_workflow_task_url(workflow_token)
929929
headers = {'Authorization': 'Token ' + self.jwt_token}
930930
response = requests.post(url, data={
931931
'row_data': json.dumps(row_data),
932+
'initiator': initiator,
932933
'link_rows': json.dumps(link_rows or []),
933934
'new_linked_rows': json.dumps(new_linked_rows or [])
934935
}, headers=headers)
935936
return parse_response(response)['task']
936937

937-
def add_workflow_task_with_existed_row(self, workflow_token, row_id):
938+
def add_workflow_task_with_existed_row(self, workflow_token, row_id, initiator=None):
938939
url = self._add_workflow_task_url(workflow_token)
939940
headers = {'Authorization': 'Token ' + self.jwt_token}
940-
response = requests.post(url, data={'row_id': row_id}, headers=headers)
941+
response = requests.post(url, data={'row_id': row_id, 'initiator': initiator}, headers=headers)
941942
return parse_response(response)['task']
942943

943944

0 commit comments

Comments
 (0)