Skip to content
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

System.NullReferenceException When Oncall Schedule Doesn't Have User #405

Open
jzhang-sre opened this issue Feb 23, 2022 · 1 comment
Open

Comments

@jzhang-sre
Copy link

jzhang-sre commented Feb 23, 2022

@NickCraver we have an on call schedule that only has people during the weekend, it's blank during the weekday so we get this object reference error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at AspNetCore.Views_PagerDuty_PagerDuty_OnCallRow.ExecuteAsync() in /_/src/OpServer.Web/Views/PagerDuty/PagerDuty.OnCallRow.cshtml:line 3

My C# is bad but I think an if statement wrapping the following line checking if the fields in the object are not null would fix this.

@Html.Partial("PagerDuty.OnCallRow", a)

@NickCraver
Copy link
Member

hmm, this would seem to imply we get a schedule that has a null entry which seems off upstream - can anyone at Stack verify? (I don't have data access). FWIW, it'd be super helpful if the team could sanity check the #401 branch - I'm not sure what Stack's using at the moment but Opserver's ready to merge down to main on a LTS release if that's good with y'all.

For example, I can't tell which branch/code this is on :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants