Skip to content

Commit

Permalink
#3879 made non-mandatory existance of named map upon deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartones committed Jun 4, 2015
1 parent 46af716 commit 9746288
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/visualization/member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,11 @@ def fetch
end

def delete(from_table_deletion=false)
begin
# Named map must be deleted before the map, or we lose the reference to it
get_named_map.delete
begin
named_map = get_named_map
# non-existing named map is not a critical failure, keep deleting even if not found
named_map.delete if named_map
rescue NamedMapsWrapper::HTTPResponseError => exception
# CDB-1964: Silence named maps API exception if deleting data to avoid interrupting whole flow
unless from_table_deletion
Expand Down

0 comments on commit 9746288

Please sign in to comment.