Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UCC
uccportal
Commits
508332f1
Commit
508332f1
authored
Dec 30, 2018
by
frekk
Browse files
added more validation to renewal
parent
25f33b8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
gms/memberdb/approve.py
View file @
508332f1
...
...
@@ -71,7 +71,11 @@ class MembershipApprovalForm(MyModelForm):
data
[
'date_approved'
]
=
now
if
(
data
[
'payment_confirm'
]
==
True
):
if
(
data
[
'payment_method'
]
==
''
):
self
.
add_error
(
'payment_method'
,
'Please select a payment method'
)
data
[
'date_paid'
]
=
now
else
:
data
[
'date_paid'
]
=
None
# make sure "no payment" is recorded for Life Members.
# XXX this might not actually be the case, since some life members may want to also be financial members (ie. for constitutional voting rights)
...
...
@@ -124,7 +128,6 @@ class MembershipApprovalAdminView(MyUpdateView):
called when the approval form is submitted and valid data (according to the form's field types and defined validators) is given
"""
def
form_valid
(
self
,
form
):
breakpoint
()
ms
=
form
.
save
()
self
.
admin
.
message_user
(
self
.
request
,
'Approve success'
)
...
...
Write
Preview
Supports
Markdown
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