Browse Source

Reformat

pull/38/head
Dashie der otter 3 weeks ago
parent
commit
5a393bba6d
Signed by: Dashie <dashie@sigpipe.me> GPG Key ID: C2D57B325840B755
2 changed files with 4 additions and 4 deletions
  1. 1
    3
      activitypub/backend.py
  2. 3
    1
      tasks.py

+ 1
- 3
activitypub/backend.py View File

@@ -192,9 +192,7 @@ class Reel2BitsBackend(ap.Backend):
192 192
         # FIXME do that better
193 193
         activity_uri = activity.get_object_id().rstrip("/activity")
194 194
         current_app.logger.debug(f"id: {activity_uri}")
195
-        orig_activity = Activity.query.filter(
196
-            Activity.url == activity_uri, Activity.type == "Create"
197
-        ).first()
195
+        orig_activity = Activity.query.filter(Activity.url == activity_uri, Activity.type == "Create").first()
198 196
         orig_activity.meta_deleted = True
199 197
         db.session.commit()
200 198
 

+ 3
- 1
tasks.py View File

@@ -58,7 +58,9 @@ def federate_delete_sound(sound: Sound) -> None:
58 58
     # Create delete
59 59
     # Somehow we needs to add /activity here
60 60
     # FIXME do that better
61
-    delete = ap.Delete(actor=actor, object=ap.Tombstone(id=sound.activity.payload['id'] + '/activity').to_dict(embed=True))
61
+    delete = ap.Delete(
62
+        actor=actor, object=ap.Tombstone(id=sound.activity.payload["id"] + "/activity").to_dict(embed=True)
63
+    )
62 64
     # Federate
63 65
     post_to_outbox(delete)
64 66
 

Loading…
Cancel
Save