migration-bio-fix
This commit is contained in:
parent
0d24193c3d
commit
8975e003a9
|
@ -295,7 +295,8 @@ def create_pgdump():
|
||||||
subprocess.call(
|
subprocess.call(
|
||||||
["pg_dump", pgurl, "-f", TODAY + "-pgdump.sql"], stderr=subprocess.STDOUT
|
["pg_dump", pgurl, "-f", TODAY + "-pgdump.sql"], stderr=subprocess.STDOUT
|
||||||
)
|
)
|
||||||
subprocess.call(["scp", TODAY + "-pgdump.sql", "root@build.discours.io:/root/."]) # manually then
|
subprocess.call(["scp", TODAY + "-pgdump.sql", "root@v2.discours.io:/root/."]) # manually then
|
||||||
|
subprocess.call(["scp", TODAY + "-pgdump.sql", "root@testapi.discours.io:/root/."]) # manually then
|
||||||
|
|
||||||
|
|
||||||
async def handle_auto():
|
async def handle_auto():
|
||||||
|
|
|
@ -524,6 +524,7 @@
|
||||||
"pandemiya": "pandemic",
|
"pandemiya": "pandemic",
|
||||||
"parizh": "paris",
|
"parizh": "paris",
|
||||||
"patriotizm": "patriotism",
|
"patriotizm": "patriotism",
|
||||||
|
"patsifizm": "pacifism",
|
||||||
"paul-tselan": "paul-tselan",
|
"paul-tselan": "paul-tselan",
|
||||||
"per-burd": "pierre-bourdieu",
|
"per-burd": "pierre-bourdieu",
|
||||||
"perezhivaniya": "worries",
|
"perezhivaniya": "worries",
|
||||||
|
|
|
@ -34,7 +34,7 @@ def migrate(entry):
|
||||||
user_dict["slug"] = (
|
user_dict["slug"] = (
|
||||||
entry["profile"].get("path").lower().replace(" ", "-").strip()
|
entry["profile"].get("path").lower().replace(" ", "-").strip()
|
||||||
)
|
)
|
||||||
bio = BeautifulSoup(entry.get("profile").get("bio") or "").text
|
bio = BeautifulSoup(entry.get("profile").get("bio") or "", features="lxml").text
|
||||||
bio = bio.replace('\(', '(').replace('\)', ')')
|
bio = bio.replace('\(', '(').replace('\)', ')')
|
||||||
|
|
||||||
# userpic
|
# userpic
|
||||||
|
|
Loading…
Reference in New Issue
Block a user