core: handle error when formatting launch URL fails closes #2304

This commit is contained in:
Jens L 2022-02-14 12:02:51 +01:00 committed by GitHub
parent d4e4f93cb4
commit df362dd9ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -56,7 +56,11 @@ class ApplicationSerializer(ModelSerializer):
if isinstance(user, SimpleLazyObject): if isinstance(user, SimpleLazyObject):
user._setup() user._setup()
user = user._wrapped user = user._wrapped
try:
return url % user.__dict__ return url % user.__dict__
except ValueError as exc:
LOGGER.warning("Failed to format launch url", exc=exc)
return url
class Meta: class Meta: