Skip to content

Commit

Permalink
fix: called row element with wrong method
Browse files Browse the repository at this point in the history
  • Loading branch information
drstrangelooker committed Oct 4, 2023
1 parent d7b9d10 commit e1b7bf7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/gzr/modules/dashboard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def query_dashboard(dashboard_id)
data = nil
begin
data = @sdk.dashboard(dashboard_id).to_attrs
data[:dashboard_filters]&.sort! { |a,b| a.row <=> b.row }
data[:dashboard_filters]&.sort! { |a,b| a[:row] <=> b[:row] }
data[:dashboard_layouts]&.sort_by! { |v| (v[:active] ? 0 : 1) }
rescue LookerSDK::Error => e
say_error "dashboard #{dashboard_id} not found"
Expand Down Expand Up @@ -95,7 +95,7 @@ def create_dashboard(dash)
begin
data = @sdk.create_dashboard(dash).to_attrs
say_error data.inspect if data.respond_to?(:message)
data[:dashboard_filters]&.sort! { |a,b| a.row <=> b.row }
data[:dashboard_filters]&.sort! { |a,b| a[:row] <=> b[:row] }
data[:dashboard_layouts]&.sort_by! { |v| (v[:active] ? 0 : 1) }
rescue LookerSDK::Error => e
say_error "Error creating dashboard(#{JSON.pretty_generate(dash)})"
Expand All @@ -109,7 +109,7 @@ def update_dashboard(dash_id,dash)
data = nil
begin
data = @sdk.update_dashboard(dash_id,dash).to_attrs
data[:dashboard_filters]&.sort! { |a,b| a.row <=> b.row }
data[:dashboard_filters]&.sort! { |a,b| a[:row] <=> b[:row] }
rescue LookerSDK::NotFound => e
say_error "dashboard #{dash_id} not found"
say_error e
Expand Down

0 comments on commit e1b7bf7

Please sign in to comment.