mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Fix the migration handler
This commit is contained in:
parent
68695fed39
commit
340d915599
1 changed files with 20 additions and 17 deletions
3
app.py
3
app.py
|
@ -465,6 +465,7 @@ def tmp_migrate():
|
|||
@login_required
|
||||
def tmp_migrate2():
|
||||
for activity in DB.activities.find():
|
||||
try:
|
||||
if (
|
||||
activity["box"] == Box.OUTBOX.value
|
||||
and activity["type"] == ActivityType.LIKE.value
|
||||
|
@ -482,6 +483,8 @@ def tmp_migrate2():
|
|||
{"remote_id": announce.id},
|
||||
{"$set": {"meta.object": obj.to_dict(embed=True)}},
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
return "Done"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue