core: fix error when getting launch URL for application with non-existent Provider

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-21 19:40:29 +01:00
parent 88859b1c26
commit 7fb939f97b
1 changed files with 2 additions and 2 deletions

View File

@ -270,8 +270,8 @@ class Application(PolicyBindingModel):
"""Get launch URL if set, otherwise attempt to get launch URL based on provider."""
if self.meta_launch_url:
return self.meta_launch_url
if self.provider:
return self.get_provider().launch_url
if provider := self.get_provider():
return provider.launch_url
return None
def get_provider(self) -> Optional[Provider]: