Skip to content

Commit

Permalink
fix(component): correctly detect existance of linked component
Browse files Browse the repository at this point in the history
This makes type checking actually work and avoids failures in some error
cases.

Fixes WEBLATE-23VE
  • Loading branch information
nijel committed Feb 5, 2025
1 parent 096cfa5 commit a833442
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weblate/trans/models/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -3854,8 +3854,8 @@ def schedule_update_checks(self, update_state: bool = False) -> None:
update_checks.delay_on_commit(self.pk, update_token, update_state=update_state)

@property
def all_repo_components(self):
if self.is_repo_link:
def all_repo_components(self) -> list[Component]:
if self.linked_component:
return [self.linked_component]
return [self]

Expand Down

0 comments on commit a833442

Please sign in to comment.