Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
5
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
156b9657
authored
Aug 31, 2022
by
Fábián János
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better bug fix:Transfer ownership
parent
8668bbfe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
circle/dashboard/forms.py
+2
-1
circle/dashboard/views/util.py
+1
-1
No files found.
circle/dashboard/forms.py
View file @
156b9657
...
@@ -1433,7 +1433,7 @@ class AclUserOrGroupAddForm(forms.Form):
...
@@ -1433,7 +1433,7 @@ class AclUserOrGroupAddForm(forms.Form):
class
TransferOwnershipForm
(
forms
.
Form
):
class
TransferOwnershipForm
(
forms
.
Form
):
name
=
autocomplete
.
Select2ListChoiceField
(
name
=
autocomplete
.
Select2ListC
reateC
hoiceField
(
widget
=
autocomplete
.
ListSelect2
(
widget
=
autocomplete
.
ListSelect2
(
url
=
'autocomplete.acl.user'
,
url
=
'autocomplete.acl.user'
,
attrs
=
{
'class'
:
'form-control'
,
attrs
=
{
'class'
:
'form-control'
,
...
@@ -1442,6 +1442,7 @@ class TransferOwnershipForm(forms.Form):
...
@@ -1442,6 +1442,7 @@ class TransferOwnershipForm(forms.Form):
label
=
_
(
"E-mail address or identifier of user"
))
label
=
_
(
"E-mail address or identifier of user"
))
class
AddGroupMemberForm
(
forms
.
Form
):
class
AddGroupMemberForm
(
forms
.
Form
):
new_member
=
autocomplete
.
Select2ListChoiceField
(
new_member
=
autocomplete
.
Select2ListChoiceField
(
widget
=
autocomplete
.
ListSelect2
(
widget
=
autocomplete
.
ListSelect2
(
...
...
circle/dashboard/views/util.py
View file @
156b9657
...
@@ -632,7 +632,7 @@ class TransferOwnershipView(CheckedDetailView, DetailView):
...
@@ -632,7 +632,7 @@ class TransferOwnershipView(CheckedDetailView, DetailView):
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
form
=
TransferOwnershipForm
(
request
.
POST
)
form
=
TransferOwnershipForm
(
request
.
POST
)
if
request
.
POST
.
get
(
'name'
)
is
None
:
if
not
form
.
is_valid
()
:
return
self
.
get
(
request
)
return
self
.
get
(
request
)
try
:
try
:
new_owner
=
search_user
(
request
.
POST
[
'name'
])
new_owner
=
search_user
(
request
.
POST
[
'name'
])
...
...
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