Skip to content

Commit 72571e8

Browse files
committed
feat(ns): implement device suffix filtering
1 parent 583e034 commit 72571e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/bss/adapters/netsapiens.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
class NetsapiensDeviceFilter:
3131
"""Logic of finding the device entry for WebTrit in the list of devices"""
3232

33-
def __init__(self, pattern: str = "WebTrit"):
33+
def __init__(self, pattern: str = "wt"):
3434
# Marker of the correct device entry in the list of devices
3535
self.pattern = pattern
3636

3737
def find_device_entry(self, devices: List[Dict]) -> Optional[Dict]:
3838
"""Find the device entry that matches the pattern"""
39-
return next((device for device in devices if self.pattern == device.get("name-full-name", "")), None)
39+
return next((device for device in devices if device.get("device", "").endswith(self.pattern)), None)
4040

4141
class NetsapiensClient(BaseModel):
4242
client_id: str = Field(default=None,

0 commit comments

Comments
 (0)