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

Enforcing PEP 3135


Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent 43f1ca85
...@@ -547,13 +547,14 @@ class JobCreate(SuccessMessageMixin, LoginRequiredMixin, CreateView): ...@@ -547,13 +547,14 @@ class JobCreate(SuccessMessageMixin, LoginRequiredMixin, CreateView):
if self.request.FILES: if self.request.FILES:
latest_job = Job.objects.filter(user_id=self.request.user.id).order_by('-id')[0] latest_job = Job.objects.filter(user_id=self.request.user.id).order_by('-id')[0]
upload_data(self.request.FILES.getlist('files'), latest_job.id) upload_data(self.request.FILES.getlist('files'), latest_job.id)
return super(JobCreate, self).form_valid(form)
return super().form_valid(form)
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
"""Pass on the docker name to the template""" """Pass on the docker name to the template"""
webapp = Webapp.objects.get(docker_name=self.kwargs['docker_name']) webapp = Webapp.objects.get(docker_name=self.kwargs['docker_name'])
kwargs['webapp_name'] = webapp.name kwargs['webapp_name'] = webapp.name
return super(JobCreate, self).get_context_data(**kwargs) return super().get_context_data(**kwargs)
def get_form_kwargs(self): def get_form_kwargs(self):
"""Return webapp data""" """Return webapp data"""
......
Supports Markdown
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