Skip to content

Commit

Permalink
ReportData - change long_id to string
Browse files Browse the repository at this point in the history
needed so that it's not bigger than INT_MAX in JS, for large region numbers
  • Loading branch information
himdel committed Dec 1, 2017
1 parent b594fe0 commit 716037a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ def view_to_hash(view, fetch_data = false)
end
new_row = {
:id => list_row_id(row),
:long_id => row['id'],
:long_id => row['id'].to_s,
:cells => [],
:quadicon => quadicon
}
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/service_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
)
results = assert_report_data_response
expect(results['data']['rows'].length).to eq(1)
expect(results['data']['rows'][0]['long_id']).to eq(vm.id)
expect(results['data']['rows'][0]['long_id']).to eq(vm.id.to_s)
end
end

Expand Down

0 comments on commit 716037a

Please sign in to comment.