From c3739f341f4b26cf252eb24bd0de8ac329ab18f0 Mon Sep 17 00:00:00 2001 From: Igor Lobanov Date: Wed, 4 Oct 2023 19:49:17 +0200 Subject: [PATCH] https://trello.com/c/QxucY23H/314-%D0%BC%D0%B8%D0%B3%D1%80%D0%B0%D1%86%D0%B8%D1%8F-%D0%BA%D0%BB%D0%B0%D1%81%D1%82%D1%8C-%D1%81%D1%82%D0%B0%D1%80%D1%83%D1%8E-%D0%B8%D0%BD%D1%84%D1%83-%D0%BE-%D1%81%D0%B5%D0%B1%D0%B5-%D0%B2-%D0%BF%D0%BE%D0%BB%D0%B5-%D0%BE-%D1%81%D0%B5%D0%B1%D0%B5-%D0%B2-%D0%BF%D1%80%D0%B5%D0%B4%D1%81%D1%82%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B8-%D1%8D%D1%82%D1%83-%D0%B8%D0%BD%D1%84%D1%83-%D0%B4%D0%BE%D0%B1%D0%B0%D0%B2%D0%BB%D1%8F%D0%B5%D0%BC-%D1%82%D0%BE%D0%BB%D1%8C%D0%BA%D0%BE-%D0%B5%D1%81%D0%BB%D0%B8-%D0%BE%D0%BD%D0%B0-%D0%BD%D0%B5-%D0%B1%D0%BE%D0%BB%D1%8C%D1%88%D0%B5-120-%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB%D0%BE%D0%B2 --- migration/tables/users.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migration/tables/users.py b/migration/tables/users.py index b23244ed..e269da28 100644 --- a/migration/tables/users.py +++ b/migration/tables/users.py @@ -37,7 +37,10 @@ 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('\)', ')') - user_dict["about"] = bio + if len(bio) > 120: + user_dict["bio"] = bio + else: + user_dict["about"] = bio # userpic try: