if isinstance(values, entity_list.EntityList) and \
all(isinstance(hl, historical_location.HistoricalLocation) for hl in values.entities):
self._historical_locations = values
raise ValueError('historical_location should be of type HistoricalLocation!')
issueservice.locations().query().expand("HistoricalLocations").list()
will now raise the ValueError on line 171, because after assignment of self._historical_locations = values function is not returned, but continues to raising ValueError, even though no actual error occured.
proposal
if isinstance(values, entity_list.EntityList) and \
all(isinstance(hl, historical_location.HistoricalLocation) for hl in values.entities):
self._historical_locations = values
return
raise ValueError('historical_location should be of type HistoricalLocation!')
Line 168-171: https://github.com/FraunhoferIOSB/FROST-Python-Client/blob/master/frost_sta_client/model/location.py#L168
now
issue
service.locations().query().expand("HistoricalLocations").list()
will now raise the ValueError on line 171, because after assignment ofself._historical_locations = values
function is not returned, but continues to raising ValueError, even though no actual error occured.proposal