Skip to content

Commit

Permalink
#3879 don't try to create named map upon deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartones committed Jun 7, 2015
1 parent 70035d8 commit a64e55c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/visualization/member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def delete(from_table_deletion=false)

support_tables.delete_all

invalidate_cache
invalidate_cache(update_named_maps = false)
overlays.destroy
layers(:base).map(&:destroy)
layers(:cartodb).map(&:destroy)
Expand Down Expand Up @@ -420,10 +420,10 @@ def non_dependent?
derived? && !single_data_layer?
end

def invalidate_cache
def invalidate_cache(update_named_maps=true)
invalidate_varnish_cache
invalidate_redis_cache
if type == TYPE_CANONICAL || type == TYPE_DERIVED || organization?
if update_named_maps && (type == TYPE_CANONICAL || type == TYPE_DERIVED || organization?)
save_named_map
end
parent.invalidate_cache unless parent_id.nil?
Expand Down

0 comments on commit a64e55c

Please sign in to comment.