Skip to content

Commit

Permalink
Fixing repositories filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Feb 13, 2022
1 parent f0400c3 commit 2c51f91
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion fastybird_devices_module/__init__.py
Expand Up @@ -18,4 +18,4 @@
Devices module
"""

__version__ = "0.39.0"
__version__ = "0.40.0"
12 changes: 1 addition & 11 deletions fastybird_devices_module/repositories/connector.py
Expand Up @@ -158,7 +158,7 @@ def get_by_identifier(self, connector_id: uuid.UUID, property_identifier: str) -
self.__session.query(ConnectorPropertyEntity)
.filter(
ConnectorPropertyEntity.connector_id == connector_id.bytes,
ConnectorPropertyEntity.identifier == property_identifier,
ConnectorPropertyEntity.col_identifier == property_identifier,
)
.first()
)
Expand All @@ -178,13 +178,3 @@ def get_all_by_connector(self, connector_id: uuid.UUID) -> List[ConnectorPropert
.filter(ConnectorPropertyEntity.connector_id == connector_id.bytes)
.all()
)

# -----------------------------------------------------------------------------

def get_all_by_parent(self, property_id: uuid.UUID) -> List[ConnectorPropertyEntity]:
"""Find all child properties"""
return (
self.__session.query(ConnectorPropertyEntity)
.filter(ConnectorPropertyEntity.parent_id == property_id.bytes)
.all()
)
2 changes: 1 addition & 1 deletion fastybird_devices_module/repositories/device.py
Expand Up @@ -131,7 +131,7 @@ def get_by_identifier(self, device_id: uuid.UUID, property_identifier: str) -> O
self.__session.query(DevicePropertyEntity)
.filter(
DevicePropertyEntity.device_id == device_id.bytes,
DevicePropertyEntity.identifier == property_identifier,
DevicePropertyEntity.col_identifier == property_identifier,
)
.first()
)
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@fastybird/devices-module",
"version": "0.39.0",
"version": "0.40.0",
"description": "Devices module data model plugin",
"keywords": [
"devices",
Expand Down

0 comments on commit 2c51f91

Please sign in to comment.