Skip to content

Commit 9e6e850

Browse files
committed
Fix is_app_principal
1 parent d64c2c4 commit 9e6e850

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jockey/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def is_app_principal(status: JujuStatus, app_name: str) -> bool:
299299
is_principal (bool)
300300
Whether the indicated application is principal.
301301
"""
302-
return status["applications"][app_name].get("subordinate-to") is None
302+
return not bool(status["applications"][app_name].get("subordinate-to"))
303303

304304

305305
def get_principal_unit_for_subordinate(status: JujuStatus, unit_name: str) -> str:

0 commit comments

Comments
 (0)