Closed Kassy0220 closed 9 months ago
開発環境とステージング環境で5期生のユーザー一覧ページ(/generations/5)にアクセスすると、次のような表示になり正しく表示されません。
/generations/5
開発環境の場合
http://localhost:3000/generations/5
ステージング環境の場合
https://bootcamp-staging.fjord.jp
https://bootcamp-staging.fjord.jp/generations/5
5期生のデータは以下の通り22人分存在するはずなので、22人のユーザーが表示される。
開発環境では、ずっと読み込みの画面が表示されます
ステージング環境では、5期生のユーザー一覧はありませんと表示されます
5期生のユーザー一覧はありません
ログを確認すると、次のようなログがありました。
おそらく、Discord情報が未登録のユーザーデータがエラーを引き起こしているものと思われます。
irb(main):005:0> user = User.find(320383523) User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 320383523], ["LIMIT", 1]] => #<User:0x000000010c02ea60 ... irb(main):006:0> user.name => "Discord 未登録" irb(main):007:0> user.discord_profile DiscordProfile Load (0.7ms) SELECT "discord_profiles".* FROM "discord_profiles" WHERE "discord_profiles"."user_id" = $1 LIMIT $2 [["user_id", 320383523], ["LIMIT", 1]] => nil irb(main):008:0> user.discord_profile.account_name (irb):8:in `<main>': undefined method `account_name' for nil:NilClass (NoMethodError)
修正により、ステージング環境でも5期生のユーザー一覧ページが正しく表示されることを確認しました。 本番環境には影響のないIssueのため、これをもちまして本IssueはCloseといたします。
概要
開発環境とステージング環境で5期生のユーザー一覧ページ(
/generations/5
)にアクセスすると、次のような表示になり正しく表示されません。再現手順
開発環境の場合
http://localhost:3000/generations/5
にアクセスし、読み込みの画面が表示され続けることを確認するステージング環境の場合
https://bootcamp-staging.fjord.jp
)へアクセスhttps://bootcamp-staging.fjord.jp/generations/5
にアクセスし、ユーザー一覧が表示されないことを確認する期待される振る舞い
5期生のデータは以下の通り22人分存在するはずなので、22人のユーザーが表示される。
スクリーンショット
開発環境では、ずっと読み込みの画面が表示されます
ステージング環境では、
5期生のユーザー一覧はありません
と表示されます環境
エラーログ
ログを確認すると、次のようなログがありました。
おそらく、Discord情報が未登録のユーザーデータがエラーを引き起こしているものと思われます。