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

modem-manager-autosetup: Fix jq filter for apn without 'type' attribute #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ktetzlaff
Copy link

@ktetzlaff ktetzlaff commented Apr 7, 2024

The initial jq filter used to extract the APN info from apns-conf.json fails with:

jq: error (...): null (null) and string ("default") cannot have their containment checked

when one of the apn objects selected by mcc/mnc doesn't have a type attribute (as is the case for mcc=262, mnc=07). As a result, otherwise matching APN objects will not be considered.

This commit fixes the jq filter by checking for the presence of the type attribute.

This PR fixes gitlab.nic.cz issue 951.

The initial jq filter used to extract the APN info from apns-conf.json
fails with:

``` text
jq: error (...): null (null) and string ("default") cannot have their containment checked
```
when one of the apn objects selected by mcc/mnc doesn't have a
'type' attribute (as is the case for mcc=262, mnc=07). As a result,
otherwise matching APN objects will not be considered.

This commit fixes the jq filter by checking for the presence of
the 'type' attribute.
@ktetzlaff ktetzlaff force-pushed the 951-fix-apn-info-for-mcc262-mnc07 branch from 9d276ee to c61ac41 Compare April 8, 2024 02:28
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

Successfully merging this pull request may close these issues.

1 participant