It is possible that App Store Connect API returns resources with empty relationships. For example List Apps endpoint can respond with a response where an app has ciProduct relationship defined as {} instead of null even though the schema suggests that relationships should always have at least links attribute defined.
It is possible that App Store Connect API returns resources with empty relationships. For example List Apps endpoint can respond with a response where an app has
ciProduct
relationship defined as{}
instead ofnull
even though the schema suggests that relationships should always have at leastlinks
attribute defined.Such a response breaks data deserialization.
Example with stacktrace
```python def test_empty_relationship(): > App( { "type": "apps", "id": "...", "links": {...}, "attributes": {...}, "relationships": { ..., "ciProduct": {}, # <-- empty relationship from App Store Connect API response! }, }, ) test_app_resource.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../../src/codemagic/apple/resources/resource.py:241: in __init__ self.relationships = self._create_relationships(api_response) ../../../src/codemagic/apple/resources/resource.py:233: in _create_relationships return cls.Relationships(**defined_fields)Handle empty relationships by just discarding them.