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
4eb40732
authored
Feb 08, 2013
by
Dányi Bence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
school: group creation with fake users allowed
parent
eb66a23d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
5 deletions
+1
-5
school/views.py
+1
-5
No files found.
school/views.py
View file @
4eb40732
...
@@ -153,11 +153,7 @@ def group_new(request):
...
@@ -153,11 +153,7 @@ def group_new(request):
if
re
.
match
(
'^[a-zA-Z][a-zA-Z0-9]{5}$'
,
member
)
==
None
:
if
re
.
match
(
'^[a-zA-Z][a-zA-Z0-9]{5}$'
,
member
)
==
None
:
messages
.
error
(
request
,
_
(
'Invalid NEPTUN code found.'
))
messages
.
error
(
request
,
_
(
'Invalid NEPTUN code found.'
))
return
redirect
(
'/'
)
return
redirect
(
'/'
)
try
:
person
=
Person
.
objects
.
get_or_create
(
code
=
member
)
user
=
User
.
objects
.
get
(
username
=
member
)
person
=
user
.
person_set
.
all
()[
0
]
except
User
.
DoesNotExist
:
pass
members
.
append
(
person
)
members
.
append
(
person
)
owner
=
request
.
user
.
person_set
.
all
()[
0
]
owner
=
request
.
user
.
person_set
.
all
()[
0
]
group
=
Group
()
group
=
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