Skip to content

Commit

Permalink
Make sure we are not calling .to_text on nil in Talk resource
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Jan 18, 2025
1 parent 1f59925 commit 622e830
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/avo/resources/talk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def fields
field :created_at, as: :date, hide_on: :index
field :updated_at, as: :date, sortable: true, filterable: true
field :speakers, as: :has_many, through: :speaker_talks, attach_scope: -> { query.order(name: :asc) }
field :raw_transcript, as: :textarea, hide_on: :index, format_using: -> { value.to_text }, readonly: true
field :enhanced_transcript, as: :textarea, hide_on: :index, format_using: -> { value.to_text }, readonly: true
field :raw_transcript, as: :textarea, hide_on: :index, format_using: -> { value&.to_text }, readonly: true
field :enhanced_transcript, as: :textarea, hide_on: :index, format_using: -> { value&.to_text }, readonly: true
# field :suggestions, as: :has_many
# field :speaker_talks, as: :has_many
end
Expand Down

0 comments on commit 622e830

Please sign in to comment.