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
Commit
5b11e755
authored
May 30, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: allow setting description at group creation
parent
9deb2f3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
circle/dashboard/forms.py
+8
-5
No files found.
circle/dashboard/forms.py
View file @
5b11e755
...
...
@@ -315,6 +315,9 @@ class VmCustomizeForm(forms.Form):
class
GroupCreateForm
(
forms
.
ModelForm
):
description
=
forms
.
CharField
(
label
=
_
(
"Description"
),
required
=
False
,
widget
=
forms
.
Textarea
(
attrs
=
{
'rows'
:
3
}))
def
__init__
(
self
,
*
args
,
**
kwargs
):
new_groups
=
kwargs
.
pop
(
'new_groups'
,
None
)
super
(
GroupCreateForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
...
...
@@ -332,11 +335,11 @@ class GroupCreateForm(forms.ModelForm):
raise
AttributeError
(
'Committing is mandatory.'
)
group
=
super
(
GroupCreateForm
,
self
)
.
save
()
orgid
=
self
.
cleaned_data
[
'org_id'
]
if
orgid
:
profile
=
group
.
profil
e
profile
.
org_id
=
orgid
profile
.
save
()
profile
=
group
.
profile
# multiple blanks were not be unique unlike NULLs are
profile
.
org_id
=
self
.
cleaned_data
[
'org_id'
]
or
Non
e
profile
.
description
=
self
.
cleaned_data
[
'description'
]
profile
.
save
()
return
group
...
...
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