liquid_feedback_frontend
changeset 1357:3b6575d156bc
Fixed automatic unit assignment 2
author | bsw |
---|---|
date | Mon Aug 06 13:39:56 2018 +0200 (2018-08-06) |
parents | 761a7d6c3e5c |
children | 06675c87f45f |
files | app/main/registration_admin/_action/update_verification.lua |
line diff
1.1 --- a/app/main/registration_admin/_action/update_verification.lua Mon Aug 06 13:39:15 2018 +0200 1.2 +++ b/app/main/registration_admin/_action/update_verification.lua Mon Aug 06 13:39:56 2018 +0200 1.3 @@ -14,7 +14,9 @@ 1.4 value = string.gsub(value, "[^0-9]", "") 1.5 if old_verification_data.unit and old_verification_data.unit ~= "" then 1.6 local old_unit_privilege = Privilege:by_pk(verification.verified_member_id, old_verification_data.unit) 1.7 - old_unit_privilege:destroy() 1.8 + if old_unit_privilege then 1.9 + old_unit_privilege:destroy() 1.10 + end 1.11 end 1.12 if value ~= old_verification_data.unit and value ~= "" then 1.13 local unit_privilege = Privilege:new()