project_notifs.each do |r_id, per_project_notif|
per_project_notif.each do |dispatch, channels|
channels.each do |channel, value|
- Api::Utils.java_facade.saveProperty('notification.' + dispatch + '.' + channel, r_id, current_user.id, 'true')
+ Api::Utils.java_facade.saveProperty('notification.' + dispatch + '.' + channel, r_id.to_i, current_user.id, 'true')
end
end
end
not_found('resource not found')
end
end
- Api::Utils.java_facade.saveProperty(key, resource_id_or_key, nil, nil)
+ Api::Utils.java_facade.saveProperty(key, resource_id_or_key.nil? ? nil : resource_id_or_key.to_i, nil, nil)
render_success('property deleted')
end
def self.clear(key, resource_id=nil, user_id=nil)
prop = by_key(key, resource_id, user_id)
if prop
- Api::Utils.java_facade.saveProperty(key, resource_id, user_id, nil)
+ Api::Utils.java_facade.saveProperty(key, resource_id.nil? ? nil : resource_id.to_i, user_id, nil)
end
prop
end
end
# create/update property in DB
- Api::Utils.java_facade.saveProperty(key, resource_id, user_id, raw_value)
+ Api::Utils.java_facade.saveProperty(key, resource_id.nil? ? nil : resource_id.to_i, user_id, raw_value)
# update returned property
if raw_value.nil?