Skip to content

Commit 873624a

Browse files
committed
Addressing @antgonza's comments
1 parent ddd16ae commit 873624a

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

qiita_pet/handlers/api_proxy/prep_template.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,12 @@ def prep_template_ajax_get_req(user_id, prep_id):
139139
alert_msg = 'This prep template is currently being updated'
140140
else:
141141
alert_type = redis_info['return']['status']
142-
alert_msg = redis_info['return']['message']
142+
alert_msg = redis_info['return']['message'].replace('\n', '</br>')
143143
else:
144144
processing = False
145145
alert_type = ''
146146
alert_msg = ''
147147

148-
alert_msg = alert_msg.replace('\n', '</br>')
149-
150148
editable = Study(study_id).can_edit(User(user_id)) and not processing
151149

152150
return {'status': 'success',

qiita_pet/handlers/api_proxy/sample_template.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,11 @@ def sample_template_summary_get_req(samp_id, user_id):
227227
alert_msg = 'This sample template is currently being processed'
228228
else:
229229
alert_type = redis_info['return']['status']
230-
alert_msg = redis_info['return']['message']
230+
alert_msg = redis_info['return']['message'].replace('\n', '</br>')
231231
else:
232232
processing = False
233233
alert_type = ''
234234
alert_msg = ''
235-
alert_msg = alert_msg.replace('\n', '</br>')
236235

237236
exists = _check_sample_template_exists(int(samp_id))
238237
if exists['status'] != 'success':

qiita_ware/context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ def safe_submit(*args, **kwargs):
270270
"""Safe wraper for the submit function
271271
272272
There are cases in which a race condition may occur: submit returns the
273-
job id but moi still did not had time to actually submit the job. In some
274-
cases this is not acceptable, so this wrapper makes sure that the job_id
275-
is returned only once the job has been already submitted.
273+
job id but moi hasn't submitted the job. In some cases this is not
274+
acceptable, so this wrapper makes sure that the job_id
275+
is returned only once the job has already been submitted
276276
277277
From previous tests, the while loop is executed ~2 times, so there is no
278278
much time lost in here

0 commit comments

Comments
 (0)