summaryrefslogtreecommitdiff
path: root/lib/tasks/gs_cluster.rake
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-12 13:53:28 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-12 13:53:28 +0100
commitc9066760fd1f5f2f892ce2be5cf2a83bb5210246 (patch)
tree82ecdd528e803ccd1b469dc13482e06cf8ea0b8e /lib/tasks/gs_cluster.rake
parent0b97717b2171820dea41de8df705f8f0e4b71464 (diff)
parentfb66a5e5a4c5d5f9eac4a5e8de6a286482cb55d5 (diff)
Release a new beta.5.1-beta4
Diffstat (limited to 'lib/tasks/gs_cluster.rake')
-rw-r--r--lib/tasks/gs_cluster.rake8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/tasks/gs_cluster.rake b/lib/tasks/gs_cluster.rake
index 7b49ebb..c248c32 100644
--- a/lib/tasks/gs_cluster.rake
+++ b/lib/tasks/gs_cluster.rake
@@ -201,10 +201,14 @@ namespace :gs_cluster do
remote_objects(remote_site, local_node_id, last_sync, Softkey).each do |remote_object|
attributes = make_hash(remote_object.attributes)
attributes[:sip_account_id] = SipAccount.where(:uuid => attributes[:sip_account_uuid]).first.try(:id)
- attributes[:call_forward_id] = CallForward.where(:uuid => attributes[:call_forward_uuid]).first.try(:id)
+
+ if ! attributes[:softkeyable_uuid].blank?
+ attributes[:softkeyable_id] = attributes[:softkeyable_type].constantize.where(:uuid => attributes[:softkeyable_uuid]).first.try(:id)
+ end
+
attributes[:softkey_function_id] = SoftkeyFunction.where(:name => attributes[:function]).first.try(:id)
attributes.delete(:sip_account_uuid)
- attributes.delete(:call_forward_uuid)
+ attributes.delete(:softkeyable_uuid)
attributes.delete(:softkey_function)
process_object(Softkey, Softkey, Softkey.where(:uuid => attributes[:uuid]).first, attributes)
end