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

View file

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