Skip to content

Commit

Permalink
fixed dataclass error
Browse files Browse the repository at this point in the history
  • Loading branch information
PietroPasotti committed Apr 24, 2023
1 parent a59bc95 commit 3231860
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scenario/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,12 @@ class Status(_DCBase):
"""Represents the 'juju statuses' of the application/unit being tested."""

# the current statuses. Will be cast to _EntitiyStatus in __post_init__
app: Union[StatusBase, _EntityStatus] = _EntityStatus("unknown")
unit: Union[StatusBase, _EntityStatus] = _EntityStatus("unknown")
app: Union[StatusBase, _EntityStatus] = dataclasses.field(
default_factory=lambda: _EntityStatus("unknown")
)
unit: Union[StatusBase, _EntityStatus] = dataclasses.field(
default_factory=lambda: _EntityStatus("unknown")
)
app_version: str = ""

# most to least recent statuses; do NOT include the current one.
Expand Down

0 comments on commit 3231860

Please sign in to comment.