Skip to content

Commit

Permalink
Merge pull request #1962 from koic/fix_an_error_when_writing_lobs
Browse files Browse the repository at this point in the history
Fix an error when writing lobs
  • Loading branch information
yahonda committed Dec 18, 2019
1 parent 6ac5f59 commit e9a1687
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def write_lobs(table_name, klass, attributes, columns) #:nodoc:
value = klass.attribute_types[col.name].serialize(value)
end
uncached do
unless lob_record = select_one(<<~SQL.squish, "Writable Large Object")
unless lob_record = select_one(sql = <<~SQL.squish, "Writable Large Object")
SELECT #{quote_column_name(col.name)} FROM #{quote_table_name(table_name)}
WHERE #{quote_column_name(klass.primary_key)} = #{id} FOR UPDATE
SQL
Expand Down

0 comments on commit e9a1687

Please sign in to comment.