Fix the migration
This commit is contained in:
6
app.py
6
app.py
@@ -464,8 +464,10 @@ def tmp_migrate():
|
||||
@app.route("/migration1_step2")
|
||||
@login_required
|
||||
def tmp_migrate2():
|
||||
# Remove buggy OStatus announce
|
||||
DB.activities.remove({"activity.object": {"$regex": f"^tag:"}, "type": ActivityType.ANNOUNCE.value})
|
||||
# Cache the object
|
||||
for activity in DB.activities.find():
|
||||
try:
|
||||
if (
|
||||
activity["box"] == Box.OUTBOX.value
|
||||
and activity["type"] == ActivityType.LIKE.value
|
||||
@@ -483,8 +485,6 @@ def tmp_migrate2():
|
||||
{"remote_id": announce.id},
|
||||
{"$set": {"meta.object": obj.to_dict(embed=True)}},
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
return "Done"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user