Skip to content

Commit

Permalink
Following review
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Orru <simone.orru@secomind.com>
  • Loading branch information
sorru94 committed Sep 28, 2023
1 parent 0f694d6 commit 4d9ae77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion astarte/device/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def __init__(self, interface_definition: dict):
raise InterfaceFileDecodeError(f"Invalid aggregation type for interface {self.name}.")

if (self.type == "properties") and (self.aggregation == "object"):
raise InterfaceFileDecodeError("Properties can only be objects.")
raise InterfaceFileDecodeError(
"Invalid aggregation type 'object', properties can only be 'individual'.")

self.mappings: list[Mapping] = []
endpoints = []
Expand Down
2 changes: 1 addition & 1 deletion astarte/device/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def __init__(self, mapping_definition: dict, is_datastream: bool):
"Fields 'reliability' and 'explicit_timestamp' have no meaning for properties."
)
if ("allow_unset" in mapping_definition) and is_datastream:
raise InterfaceFileDecodeError("Field 'allow_unset' have no meaning for datastreams.")
raise InterfaceFileDecodeError("Field 'allow_unset' has no meaning for datastreams.")

def validate_path(self, path: str):
"""
Expand Down

0 comments on commit 4d9ae77

Please sign in to comment.