Fix things
This commit is contained in:
+7
-5
@@ -139,10 +139,12 @@ def kaehmy_submit(request, *args, **kwargs):
|
||||
application = form.save()
|
||||
custom_name = form.cleaned_data.get('custom_role_name')
|
||||
custom_is_board = form.cleaned_data.get('custom_role_is_board')
|
||||
custom_role = CustomKaehmyRole(
|
||||
name=custom_name, is_board=custom_is_board)
|
||||
custom_role.save()
|
||||
application.custom_roles.add(custom_role)
|
||||
|
||||
if len(custom_name) > 0:
|
||||
custom_role = CustomKaehmyRole(
|
||||
name=custom_name, is_board=custom_is_board)
|
||||
custom_role.save()
|
||||
application.custom_roles.add(custom_role)
|
||||
|
||||
email = form.cleaned_data.get('email', '')
|
||||
name = form.cleaned_data.get('name', 'Anonymous')
|
||||
@@ -151,7 +153,7 @@ def kaehmy_submit(request, *args, **kwargs):
|
||||
'Mahdollisista kommenteista tulee ilmoitus sähköpostitse.\r\n\r\n'
|
||||
'Käy katsomassa kaehmytilanne osoitteessa http://sika.sahkoinsinoorikilta.fi/kaehmy').format(name)
|
||||
|
||||
# send_email(email, subject, body)
|
||||
send_email(email, subject, body)
|
||||
logging.debug('Sent kaehmy email to recipient <{}>'.format(email))
|
||||
else:
|
||||
context = {
|
||||
|
||||
Reference in New Issue
Block a user