Skip to content

Commit c5df5ff

Browse files
author
Daniel Abercrombie
committed
Pass user to submit2
1 parent 7a92f39 commit c5df5ff

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
'passlib>=1.6',
2929
'bcrypt',
3030
'pyOpenSSL',
31-
'pyyaml',
31+
'pyyaml>=5.1',
3232
'validators',
3333
'tabulate',
3434
'pymongo<3.5.0',

workflowwebtools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
:author: Daniel Abercrombie <dabercro@mit.edu>
55
"""
66

7-
__version__ = '0.10.0'
7+
__version__ = '0.10.1'
88

99
__all__ = []

workflowwebtools/manageactions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def submitaction(user, workflows, action, session=None, **kwargs):
182182
return workflows, reasons, params
183183

184184

185-
def submit2(documents): # pylint: disable=missing-docstring
185+
def submit2(user, documents): # pylint: disable=missing-docstring
186186
coll = get_actions_collection()
187187

188188
for document in documents:
@@ -194,6 +194,7 @@ def submit2(documents): # pylint: disable=missing-docstring
194194
coll.update_one({'workflow': workflow},
195195
{'$set':
196196
{'timestamp': int(time.time()),
197+
'user': user,
197198
'parameters': params,
198199
'acted': 0}},
199200
upsert=True)

workflowwebtools/workflowtools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def getworkflows(self, prepid):
215215
@cherrypy.tools.json_out()
216216
def submit2(self):
217217
input_json = cherrypy.request.json
218-
manageactions.submit2(input_json['documents'])
218+
manageactions.submit2(cherrypy.request.login, input_json['documents'])
219219
self.update_statuses()
220220
return {'message': 'Done'}
221221

0 commit comments

Comments
 (0)