Skip to content

Commit

Permalink
Fixing method name
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Aug 31, 2021
1 parent f36221b commit 0bb8acb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions devices_module/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class DeviceEntity(db.Entity):
controls: List["DeviceControlEntity"] = Set("DeviceControlEntity", reverse="device")
connector: "DeviceConnectorEntity" or None = Optional("DeviceConnectorEntity", reverse="device")

def to_dic(self) -> Dict[str, str or int or bool or None]:
def to_dict(self) -> Dict[str, str or int or bool or None]:
"""Transform entity to dictionary"""
parent_id: str or None = self.parent.device_id.__str__() if self.parent is not None else None

Expand Down Expand Up @@ -217,7 +217,7 @@ class DevicePropertyEntity(db.Entity):

device: DeviceEntity = Required("DeviceEntity", reverse="properties", column="device_id", nullable=False)

def to_dic(self) -> Dict[str, str or int or bool or None]:
def to_dict(self) -> Dict[str, str or int or bool or None]:
"""Transform entity to dictionary"""
if isinstance(self.data_type, DataType):
data_type = self.data_type.value
Expand Down Expand Up @@ -370,7 +370,7 @@ def set_values(self, select_values: List[Dict[str, str]]) -> None:
"""Set values for options"""
self.params["select_values"] = select_values

def to_dic(self) -> Dict[str, str or int or bool or None]:
def to_dict(self) -> Dict[str, str or int or bool or None]:
"""Transform entity to dictionary"""
if isinstance(self.data_type, DataType):
data_type = self.data_type.value
Expand Down Expand Up @@ -532,7 +532,7 @@ class ChannelEntity(db.Entity):
configuration: List["ChannelConfigurationEntity"] = Set("ChannelConfigurationEntity", reverse="channel")
controls: List["ChannelControlEntity"] = Set("ChannelControlEntity", reverse="channel")

def to_dic(self) -> Dict[str, str or int or bool or None]:
def to_dict(self) -> Dict[str, str or int or bool or None]:
"""Transform entity to dictionary"""
return {
"id": self.channel_id.__str__(),
Expand Down Expand Up @@ -607,7 +607,7 @@ class ChannelPropertyEntity(db.Entity):

channel: ChannelEntity = Required("ChannelEntity", reverse="properties", column="channel_id", nullable=False)

def to_dic(self) -> Dict[str, str or int or bool or None]:
def to_dict(self) -> Dict[str, str or int or bool or None]:
"""Transform entity to dictionary"""
if isinstance(self.data_type, DataType):
data_type = self.data_type.value
Expand Down Expand Up @@ -760,7 +760,7 @@ def set_values(self, select_values: List[Dict[str, str]]) -> None:
"""Set values for options"""
self.params["select_values"] = select_values

def to_dic(self) -> Dict[str, str or int or bool or None]:
def to_dict(self) -> Dict[str, str or int or bool or None]:
"""Transform entity to dictionary"""
if isinstance(self.data_type, DataType):
data_type = self.data_type.value
Expand Down

0 comments on commit 0bb8acb

Please sign in to comment.