From b485a9f1f1085aa24593abb72ba09849f44b418d Mon Sep 17 00:00:00 2001 From: MarkusRost <2701034-MarkusRost@users.noreply.gitlab.com> Date: Sat, 22 May 2021 14:20:41 +0000 Subject: [PATCH] fix image license --- extensions/base/mediawiki.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/base/mediawiki.py b/extensions/base/mediawiki.py index 9040b2f..e2b1dd8 100644 --- a/extensions/base/mediawiki.py +++ b/extensions/base/mediawiki.py @@ -219,13 +219,13 @@ def embed_upload_upload(ctx, change) -> DiscordMessage: except KeyError: logger.exception( "Unknown error when retriefing the image data for a license, full content: {}".format(image_data)) - if license is not None: - embed["description"] += _("\nLicense: {}").format(license) if image_direct_url: embed.add_field(_("Options"), _("([preview]({link}))").format(link=image_direct_url)) if settings["appearance"]["embed"]["embed_images"]: embed["image"]["url"] = image_direct_url embed_helper(ctx, embed, change) + if license is not None: + embed["description"] += _("\nLicense: {}").format(license) return embed