liquid_feedback_frontend
diff app/main/registration_admin/_action/update_verification.lua @ 1815:6246f8249f9f
Actually handle the unique violation
author | bsw |
---|---|
date | Thu Dec 02 13:35:38 2021 +0100 (2021-12-02) |
parents | 8f431f4cc87f |
children | baa87c3780ad |
line diff
1.1 --- a/app/main/registration_admin/_action/update_verification.lua Thu Dec 02 13:34:22 2021 +0100 1.2 +++ b/app/main/registration_admin/_action/update_verification.lua Thu Dec 02 13:35:38 2021 +0100 1.3 @@ -80,7 +80,10 @@ 1.4 1.5 member.notify_email = param.get("email") 1.6 1.7 - check_db_error(member:try_save()) 1.8 + local success = check_db_error(member:try_save()) 1.9 + if not success then 1.10 + return false 1.11 + end 1.12 1.13 update_data() 1.14 1.15 @@ -107,7 +110,11 @@ 1.16 member.identification = identification 1.17 1.18 member.notify_email = param.get("email") 1.19 - check_db_error(member:try_save()) 1.20 + 1.21 + local success = check_db_error(member:try_save()) 1.22 + if not success then 1.23 + return false 1.24 + end 1.25 1.26 if config.self_registration.manual_invitation then 1.27 local function secret_token()