From af2e115f1de021a4c2f4654f30b05566737844ec Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 1 Nov 2023 20:29:02 +0000 Subject: [PATCH] Avoid confusion between argument and global --- utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils.py b/utils.py index 2e1b691fd..560dd9533 100644 --- a/utils.py +++ b/utils.py @@ -4462,12 +4462,12 @@ def is_quote_toot(post_json_object: str, content: str) -> bool: return False -def license_link_from_name(license: str) -> str: +def license_link_from_name(license_name: str) -> str: """Returns the license link from its name """ - if '://' in license: - return license - value_upper = license.upper() + if '://' in license_name: + return license_name + value_upper = license_name.upper() if 'CC-BY-SA-NC' in value_upper or \ 'CC-BY-NC-SA' in value_upper or \ 'CC BY SA NC' in value_upper or \