Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
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
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
Hide 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):
if
re
.
match
(
'^[a-zA-Z][a-zA-Z0-9]{5}$'
,
member
)
==
None
:
messages
.
error
(
request
,
_
(
'Invalid NEPTUN code found.'
))
return
redirect
(
'/'
)
try
:
user
=
User
.
objects
.
get
(
username
=
member
)
person
=
user
.
person_set
.
all
()[
0
]
except
User
.
DoesNotExist
:
pass
person
=
Person
.
objects
.
get_or_create
(
code
=
member
)
members
.
append
(
person
)
owner
=
request
.
user
.
person_set
.
all
()[
0
]
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