Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
098c2b78
Commit
098c2b78
authored
Aug 04, 2021
by
Guilhem Saurel
Browse files
fix docker filters for active targets
parent
009da5c7
Pipeline
#15511
passed with stage
in 2 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/views.py
View file @
098c2b78
...
...
@@ -2,8 +2,10 @@ from subprocess import PIPE, Popen, run
from
django.http
import
Http404
from
django.http.response
import
HttpResponse
,
HttpResponseRedirect
,
JsonResponse
from
django.shortcuts
import
get_object_or_404
from
django.urls
import
reverse
from
django.views.generic
import
DetailView
,
TemplateView
from
django_filters.views
import
FilterView
from
django_tables2
import
RequestConfig
from
django_tables2.views
import
SingleTableMixin
,
SingleTableView
...
...
@@ -137,7 +139,7 @@ def docker(request):
filters
=
request
.
GET
.
dict
()
if
'cmd'
in
filters
and
filters
[
'cmd'
]
in
[
'push'
,
'pull'
,
'build'
]:
cmd
=
filters
.
pop
(
'cmd'
)
if
'target__name'
in
filters
:
if
'target__name'
in
filters
and
not
get_object_or_404
(
models
.
Target
,
name
=
filters
[
'target__name'
]).
active
:
filters
[
'robotpkg__extended_target__name'
]
=
filters
[
'target__name'
]
else
:
filters
[
'target__active'
]
=
True
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment