Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
0c9798e7
Verified
Commit
0c9798e7
authored
Jul 11, 2018
by
Sébastiaan Versteeg
Browse files
Fix payment not being added to registration entry
parent
c5673057
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/registrations/services.py
View file @
0c9798e7
...
...
@@ -122,6 +122,9 @@ def accept_entries(queryset):
continue
payment
=
_create_payment_for_entry
(
entry
)
entry
.
refresh_from_db
()
try
:
if
entry
.
registration
.
username
is
None
:
entry
.
registration
.
username
=
_generate_username
(
...
...
website/registrations/tests/test_services.py
View file @
0c9798e7
...
...
@@ -183,6 +183,11 @@ class ServicesTest(TestCase):
rows_updated
=
services
.
accept_entries
(
Entry
.
objects
.
all
())
self
.
e2
.
refresh_from_db
()
self
.
e3
.
refresh_from_db
()
self
.
assertNotEqual
(
self
.
e2
.
payment
,
None
)
self
.
assertNotEqual
(
self
.
e3
.
payment
,
None
)
self
.
assertEqual
(
self
.
e2
.
username
,
'ptest'
)
self
.
assertEqual
(
rows_updated
,
3
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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