mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Work in progress.
This commit is contained in:
@@ -61,8 +61,10 @@ class UKMobileNumber(StringField):
|
||||
|
||||
if len(self.data) != 9:
|
||||
return
|
||||
|
||||
self.data = '+44 7{} {} {}'.format(*re.findall('...', self.data))
|
||||
# TODO implement in the render field method.
|
||||
# API's require no spaces in the number
|
||||
#self.data = '+44 7{} {} {}'.format(*re.findall('...', self.data))
|
||||
self.data = '+447{}{}{}'.format(*re.findall('...', self.data))
|
||||
|
||||
|
||||
def mobile_number():
|
||||
|
||||
@@ -16,7 +16,7 @@ def add_service():
|
||||
heading = 'Add a new service'
|
||||
if form.validate_on_submit():
|
||||
user = users_dao.get_user_by_id(session['user_id'])
|
||||
service_id = services_dao.insert_new_service(form.name.data, user)
|
||||
service_id = services_dao.insert_new_service(form.name.data, user.id)
|
||||
return redirect(url_for('main.service_dashboard', service_id=service_id))
|
||||
else:
|
||||
return render_template(
|
||||
|
||||
Reference in New Issue
Block a user