Filters on kwargs for find_object
This commit is contained in:
parent
6591785a10
commit
74b99c4a8d
5 changed files with 18 additions and 11 deletions
|
|
@ -56,7 +56,7 @@ class SachsenLevelBackend(BaseBackend, ICapGauge):
|
|||
|
||||
def iter_sensors(self, gauge, pattern=None):
|
||||
if not isinstance(gauge, Gauge):
|
||||
gauge = find_object(self.browser.get_rivers_list(), gauge, error=SensorNotFound)
|
||||
gauge = find_object(self.browser.get_rivers_list(), id=gauge, error=SensorNotFound)
|
||||
if pattern is None:
|
||||
for sensor in gauge.sensors:
|
||||
yield sensor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue