Bladeren bron

Fixed issue with false values showing up blank

Andrew Kane 7 jaren geleden
bovenliggende
commit
93f620431e
2 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 1 0
      CHANGELOG.md
  2. 1 1
      lib/blazer/adapters/sql_adapter.rb

+ 1 - 0
CHANGELOG.md

@@ -1,5 +1,6 @@
 ## 1.7.6 [unreleased]
 
+- Fixed issue with false values showing up blank
 - Fixed preview for table names with certain characters
 
 ## 1.7.5

+ 1 - 1
lib/blazer/adapters/sql_adapter.rb

@@ -28,7 +28,7 @@ module Blazer
             columns = result.columns
             cast_method = Rails::VERSION::MAJOR < 5 ? :type_cast : :cast_value
             result.rows.each do |untyped_row|
-              rows << (result.column_types.empty? ? untyped_row : columns.each_with_index.map { |c, i| untyped_row[i] ? result.column_types[c].send(cast_method, untyped_row[i]) : nil })
+              rows << (result.column_types.empty? ? untyped_row : columns.each_with_index.map { |c, i| untyped_row[i] ? result.column_types[c].send(cast_method, untyped_row[i]) : untyped_row[i] })
             end
           end
         rescue => e