Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit d9df98f7 authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Bug fix on job version testing



This patch suggests two bug fixes. The first one return an empty string
in the case of the user doesn't send any parameters for the application.
The second bug fix is related to the test of an existing commited app version.
The test of the existing version wasn't done before requesting the app
version itself. This patch corrects it.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent ddf41f13
Pipeline #43077 failed with stage
in 1 minute and 9 seconds
......@@ -73,12 +73,11 @@ def jobs(request):
return JsonResponse({'error': 'Unknown queue'}, status=400)
log.info("Job submit by user %s", user)
job = Job.objects.create(param=request.POST['job[param]'], queue=queue, webapp=app, user=user.user)
job.version = app.get_webapp_version().number # TODO: add version selection in the api
if job.version is None:
job = Job.objects.create(param=request.POST.get('job[param]', ''), queue=queue, webapp=app, user=user)
if app.get_webapp_version() is None:
log.debug('No usable versions')
return JsonResponse({'error': "This app is not yet published"}, status=404)
job.version = app.get_webapp_version().number # TODO: add version selection in the api
upload_data(request.FILES.values(), job)
# run the Job validators
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment