-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Return empty list if there is no siriUrls in situations/infoLinks #6232
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6232 +/- ##
=============================================
+ Coverage 69.91% 69.94% +0.02%
- Complexity 17736 17747 +11
=============================================
Files 2006 2006
Lines 75526 75536 +10
Branches 7730 7733 +3
=============================================
+ Hits 52804 52832 +28
+ Misses 20036 20011 -25
- Partials 2686 2693 +7 ☔ View full report in Codecov by Sentry. |
We need to clearify if the GTFS URL and the SIRI URIs are required or not. The URIs are required in Siri, but there is a integration test witch fails - is the test data invalid? |
This SIRI SX message can be used to test this - it should not be imported - the infolink uri is missing:
|
021893f
to
f492446
Compare
I18NString.hasNoValue(alert.headerText()) && | ||
I18NString.hasNoValue(alert.descriptionText()) && | ||
I18NString.hasNoValue(alert.detailText()) |
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.
Should this check not be part of TransitAlertBuilder
?
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.
It should and I first put it in the builder - but the builder should not have the validation logic, the main class should. The problem is that if we validate when we construct the new entity, I would have to change the SiriAlertsUpdateHandler
more than I like for a simple bug fix.
Summary
In the Transmodel API the
/stopPlace/quays[]/situations[]/infoLinks
is none-null, but the current code returnsnull
if no infoLinks exist. This PR return an empty list instead.Issue
There is no issue for this. This bug was reported by T. Sverdvik, Ruter yesterday in \#shared-entur-ruter-utvikling at Entur.
Unit tests
No test is added.
Documentation
Not changed.
Changelog
Probably to small of a fix to be notable.
Bumping the serialization version id
Not needed.