Skip to content

Commit

Permalink
Update name property of DepConditionWrapperCondition (#24479)
Browse files Browse the repository at this point in the history
## Summary & Motivation

The `name` property is now favored in the UI over `description`, and has a default value of the name of the class. This meant that in rows where we evaluated something against a specfic asset, it would render as DepConditionWrapperCondition instead of the asset name.

## How I Tested These Changes

looked at the UI

## Changelog

[ui] Fixed an issue that would cause some AutomationCondition evaluations to be labeled `DepConditionWrapperCondition` instead of the key that they were evaluated against.

- [ ] `NEW` _(added new feature or capability)_
- [x] `BUGFIX` _(fixed a bug)_
- [ ] `DOCS` _(added or updated documentation)_
  • Loading branch information
OwenKephart authored Sep 13, 2024
1 parent 2f0664d commit bf14de6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ class DepConditionWrapperCondition(AutomationCondition):
operand: AutomationCondition
label: Optional[str] = None

@property
def name(self) -> str:
return self.dep_key.to_user_string()

@property
def description(self) -> str:
return f"{self.dep_key.to_user_string()}"
return self.dep_key.to_user_string()

def evaluate(self, context: AutomationContext) -> AutomationResult:
# only evaluate parents of the current candidates
Expand Down

0 comments on commit bf14de6

Please sign in to comment.