lib/osm/api.rb in osm-0.0.7 vs lib/osm/api.rb in osm-0.0.8
- old
+ new
@@ -501,10 +501,10 @@
def update_evening(evening, api_data={})
response = perform_query("programme.php?action=editEvening", api_data.merge(evening.data_for_saving))
# The cached programmes for the section will be out of date - remove them
get_terms(api_data).each do |term|
- Rails.cache.delete("OSMAPI-programme-#{term.section_id}-#{term.id}") if term.section_id == programme_item.section_id
+ Rails.cache.delete("OSMAPI-programme-#{term.section_id}-#{term.id}") if term.section_id == evening.section_id
end
return response.is_a?(Hash) && (response['result'] == 0)
end