Merge pull request #81 from Discours/feature/bio_fix_2

Fix on https://trello.com/c/QxucY23H
This commit is contained in:
Kosta 2023-10-04 21:02:53 +03:00 committed by GitHub
commit bb56104a34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,9 @@ def migrate(entry):
slug = re.sub('[^0-9a-zA-Z]+', '-', slug).strip()
user_dict["slug"] = slug
bio = (entry.get("profile", {"bio": ""}).get("bio") or "").replace('\(', '(').replace('\)', ')')
if len(bio) > 120:
user_dict["bio"] = bio
else:
user_dict["about"] = bio
# userpic