-
Notifications
You must be signed in to change notification settings - Fork 205
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
Prevent error about undefined value in next_previous route #4574
Prevent error about undefined value in next_previous route #4574
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4574 +/- ##
=======================================
Coverage 97.98% 97.98%
=======================================
Files 375 375
Lines 34332 34332
=======================================
Hits 33640 33640
Misses 692 692
Continue to review full report at Codecov.
|
f071dd2
to
7697ecd
Compare
@@ -428,7 +428,7 @@ sub _show { | |||
} | |||
|
|||
sub job_next_previous_ajax ($self) { | |||
my $main_job = $self->get_current_job; | |||
return $self->reply->not_found unless my $main_job = $self->_get_current_job; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind extending our unit tests to cover this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I consider this not necessary, it's just basic in-line safety checks which doesn't even touch coverage. Please also see #4575 where I try to make the overall code simpler with exception handling so that we don't need these checks at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow. I'm asking if we can have a regression test since this issue was only seen in production.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think a test would be nice
Related progress issue: https://progress.opensuse.org/issues/108662