Fix the migration handler
This commit is contained in:
3
app.py
3
app.py
@@ -465,6 +465,7 @@ def tmp_migrate():
|
|||||||
@login_required
|
@login_required
|
||||||
def tmp_migrate2():
|
def tmp_migrate2():
|
||||||
for activity in DB.activities.find():
|
for activity in DB.activities.find():
|
||||||
|
try:
|
||||||
if (
|
if (
|
||||||
activity["box"] == Box.OUTBOX.value
|
activity["box"] == Box.OUTBOX.value
|
||||||
and activity["type"] == ActivityType.LIKE.value
|
and activity["type"] == ActivityType.LIKE.value
|
||||||
@@ -482,6 +483,8 @@ def tmp_migrate2():
|
|||||||
{"remote_id": announce.id},
|
{"remote_id": announce.id},
|
||||||
{"$set": {"meta.object": obj.to_dict(embed=True)}},
|
{"$set": {"meta.object": obj.to_dict(embed=True)}},
|
||||||
)
|
)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
return "Done"
|
return "Done"
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user