From 2244c0fd1afc9627a8986301cc0a74cbcf9ebca7 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Sun, 25 Feb 2024 13:29:32 +1100 Subject: [PATCH] fix: Reusing the same variable --- main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 6c2953b..577e343 100644 --- a/main.py +++ b/main.py @@ -190,13 +190,13 @@ def site_post(): address.append({'token': 'sol', 'address': request.form['sol']}) # Remove empty socials and addresses - socials = [i for i in socials if i['url'] != ''] + socials = [social for socials in socials if social['url'] != ''] # Make sure links all start with http or https - for i in socials: + for social in socials: # Set link to lowercase - i['url'] = i['url'].lower() - if not i['url'].startswith('http') and i['name'] != 'email': - i['url'] = 'https://' + i['url'] + social['url'] = social['url'].lower() + if not social['url'].startswith('http') and social['name'] != 'email': + social['url'] = 'https://' + social['url'] data['socials'] = socials