forked from DMPRoadmap/roadmap
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActionView::Template::Error: undefined method `name' for nil:NilClass #838
Comments
Further details from rollbar.com reveal that this error occurs on the path 3.1.4 :001 > Role.where(plan_id: 10833)
Role Load (1.9ms) SELECT "roles".* FROM "roles" WHERE "roles"."plan_id" = $1 [["plan_id", 10833]]
=>
[#<Role:0x000079f77a3561f0
id: 13363,
user_id: 22885,
plan_id: 10833,
created_at: Mon, 13 Mar 2023 14:44:15.559673000 UTC +00:00,
updated_at: Mon, 13 Mar 2023 14:44:15.559673000 UTC +00:00,
access: 15,
active: true>,
#<Role:0x000079f77a3433c0
id: 13383,
user_id: 22690,
plan_id: 10833,
created_at: Tue, 14 Mar 2023 13:52:40.282986000 UTC +00:00,
updated_at: Tue, 14 Mar 2023 13:52:40.282986000 UTC +00:00,
access: 14,
active: true>,
#<Role:0x000079f77a343230
id: 13386,
user_id: 22685,
plan_id: 10833,
created_at: Tue, 14 Mar 2023 13:53:24.238440000 UTC +00:00,
updated_at: Tue, 14 Mar 2023 13:53:24.238440000 UTC +00:00,
access: 14,
active: true>,
#<Role:0x000079f77a3430a0
id: 13387,
user_id: 22696,
plan_id: 10833,
created_at: Tue, 14 Mar 2023 13:53:53.547210000 UTC +00:00,
updated_at: Tue, 14 Mar 2023 13:53:53.547210000 UTC +00:00,
access: 14,
active: true>,
#<Role:0x000079f77a342fb0
id: 13392,
user_id: nil,
plan_id: 10833,
created_at: Tue, 14 Mar 2023 17:16:42.966686000 UTC +00:00,
updated_at: Tue, 14 Mar 2023 17:16:42.966686000 UTC +00:00,
access: 14,
active: true>] The last Role entry has 3.1.4 :002 > Role.find(13392).user.name
Role Load (1.4ms) SELECT "roles".* FROM "roles" WHERE "roles"."id" = $1 LIMIT $2 [["id", 13392], ["LIMIT", 1]]
(irb):2:in `<main>': undefined method `name' for nil:NilClass (NoMethodError)
3.1.4 :003 > Role.find(13392).user
Role Load (2.9ms) SELECT "roles".* FROM "roles" WHERE "roles"."id" = $1 LIMIT $2 [["id", 13392], ["LIMIT", 1]]
=> nil |
The db has only two roles entries with
|
@aaronskiba will take a look at the database and find reason for nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
View details in Rollbar: https://app.rollbar.com/a/ualbertalib/fix/item/dmp_assistant/507
The text was updated successfully, but these errors were encountered: