liquid_feedback_frontend
changeset 1182:9aab637c19ef
Fixed usage of a global variable
author | bsw |
---|---|
date | Thu Mar 26 20:15:07 2015 +0100 (2015-03-26) |
parents | d83ecd35458c |
children | 1390a21eb084 |
files | app/main/admin/_action/area_update.lua |
line diff
1.1 --- a/app/main/admin/_action/area_update.lua Thu Mar 26 20:13:39 2015 +0100 1.2 +++ b/app/main/admin/_action/area_update.lua Thu Mar 26 20:15:07 2015 +0100 1.3 @@ -20,7 +20,7 @@ 1.4 } 1.5 1.6 -- we have to update the default flag because update_relationship can't handle it 1.7 -old_default = AllowedPolicy:new_selector() 1.8 +local old_default = AllowedPolicy:new_selector() 1.9 :add_where{ "allowed_policy.area_id = ? AND allowed_policy.default_policy = 't'", area.id } 1.10 :optional_object_mode() 1.11 :exec() 1.12 @@ -30,10 +30,10 @@ 1.13 old_default:save() 1.14 end 1.15 1.16 -default_policy_id = param.get("default_policy", atom.integer) 1.17 +local default_policy_id = param.get("default_policy", atom.integer) 1.18 1.19 if default_policy_id and default_policy_id ~= -1 then 1.20 - pol = AllowedPolicy:new_selector() 1.21 + local pol = AllowedPolicy:new_selector() 1.22 :add_where{ "allowed_policy.area_id = ? AND allowed_policy.policy_id = ?", area.id, default_policy_id } 1.23 :optional_object_mode() 1.24 :exec()