diff --git a/api/api/models/media.py b/api/api/models/media.py index 788aff51b00..86352967b27 100644 --- a/api/api/models/media.py +++ b/api/api/models/media.py @@ -127,8 +127,9 @@ def license_url(self) -> str | None: return url logger.warning( - f"The {self.__class__.__name__.lower()} with identifier={self.identifier} " - f"has no `license_url` in `meta_data`." + "Media item missing `license_url` in `meta_data`", + media_class=self.__class__.__name__, + identifier=self.identifier, ) try: return License(self.license.lower(), self.license_version).url