Skip to content

Commit

Permalink
fix: if speaker_id is nil, set nil
Browse files Browse the repository at this point in the history
  • Loading branch information
takaishi committed Nov 20, 2024
1 parent ed08c1b commit 10241d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/entry_sheet_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def show
object = JSON.parse(decrypted)

@profile = Profile.find(object['profile_id'])
@speaker = Speaker.find(object['speaker_id'])
@speaker = object['speaker_id'].present? ? Speaker.find(object['speaker_id']) : nil
@conference = Conference.find_by(abbr: params[:event])

# 全てのテーブルの行数を取得
Expand Down

0 comments on commit 10241d3

Please sign in to comment.