Skip to content

Commit d5a5f78

Browse files
committed
fix: improved installability check
1 parent 04a9173 commit d5a5f78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wlhosted/addons.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def can_install(
5353
project: Project | None = None,
5454
) -> bool:
5555
"""Only useful for Unknown Horizons project."""
56-
if not component or component.project.slug != "uh":
56+
if component is None or component.project.slug != "uh":
5757
return False
5858
return super().can_install(component=component, project=project)
5959

@@ -76,7 +76,7 @@ def can_install(
7676
project: Project | None = None,
7777
) -> bool:
7878
# Only instalable on the sandbox project
79-
return component and component.project.slug == "sandbox"
79+
return component is not None and component.project.slug == "sandbox"
8080

8181
def daily(self, component: Component, activity_log_id: int | None = None) -> None:
8282
component.do_reset()

0 commit comments

Comments
 (0)