Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
c8d4ae25
authored
Aug 01, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix lease queryset in TemplateForm
parent
4e5dd156
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
circle/dashboard/forms.py
+5
-2
No files found.
circle/dashboard/forms.py
View file @
c8d4ae25
...
...
@@ -616,8 +616,11 @@ class TemplateForm(forms.ModelForm):
self
.
instance
.
ram_size
=
512
self
.
instance
.
num_cores
=
2
self
.
fields
[
"lease"
]
.
queryset
=
Lease
.
get_objects_with_level
(
"operator"
,
self
.
user
)
lease_queryset
=
(
Lease
.
get_objects_with_level
(
"operator"
,
self
.
user
)
.
distinct
()
|
Lease
.
objects
.
filter
(
pk
=
self
.
instance
.
lease_id
)
.
distinct
())
self
.
fields
[
"lease"
]
.
queryset
=
lease_queryset
def
clean_owner
(
self
):
if
self
.
instance
.
pk
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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