From 795ef0990cf4dea32ab3abcceb98a7654c7a633e Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 1 Sep 2019 10:34:02 +0200 Subject: [PATCH] Fix formatting --- core/migrations.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/migrations.py b/core/migrations.py index 9f20a9d..970e543 100644 --- a/core/migrations.py +++ b/core/migrations.py @@ -198,7 +198,10 @@ class _20190830_FollowFollowBackMigration(Migration): for data in find_activities({**by_type(ap.ActivityType.ACCEPT), **in_inbox()}): try: update_one_activity( - {**by_type(ap.ActivityType.FOLLOW), **by_remote_id(data["meta"]["object_id"])}, + { + **by_type(ap.ActivityType.FOLLOW), + **by_remote_id(data["meta"]["object_id"]), + }, upsert({MetaKey.FOLLOW_STATUS: FollowStatus.ACCEPTED.value}), ) # Check if we are following this actor @@ -221,7 +224,10 @@ class _20190830_FollowFollowBackMigration(Migration): for data in find_activities({**by_type(ap.ActivityType.REJECT), **in_inbox()}): try: update_one_activity( - {**by_type(ap.ActivityType.FOLLOW), **by_remote_id(data["meta"]["object_id"])}, + { + **by_type(ap.ActivityType.FOLLOW), + **by_remote_id(data["meta"]["object_id"]), + }, upsert({MetaKey.FOLLOW_STATUS: FollowStatus.REJECTED.value}), ) except Exception: