Merge branch 'master' into primary-provider

Conflicts:
	tests/app/dao/test_provider_rates_dao.py
This commit is contained in:
Martyn Inglis
2016-05-11 14:04:15 +01:00
15 changed files with 61 additions and 38 deletions

View File

@@ -12,7 +12,7 @@ def create_secret_code():
def save_model_user(usr, update_dict={}, pwd=None):
if pwd:
usr.password = pwd
usr.password_changed_at = datetime.now()
usr.password_changed_at = datetime.utcnow()
if update_dict:
if update_dict.get('id'):
del update_dict['id']
@@ -25,7 +25,7 @@ def save_model_user(usr, update_dict={}, pwd=None):
def create_user_code(user, code, code_type):
verify_code = VerifyCode(code_type=code_type,
expiry_datetime=datetime.now() + timedelta(hours=1),
expiry_datetime=datetime.utcnow() + timedelta(hours=1),
user=user)
verify_code.code = code
db.session.add(verify_code)