From a4133c60018772af78b5bb5813050b4d1fbf5b34 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 21 Feb 2024 16:42:14 -0300 Subject: [PATCH] fix: asegurarse que todos los registros existan --- .../api/v1/webhooks/social_inbox_controller.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/controllers/api/v1/webhooks/social_inbox_controller.rb b/app/controllers/api/v1/webhooks/social_inbox_controller.rb index fb7ede50..e6b80c4b 100644 --- a/app/controllers/api/v1/webhooks/social_inbox_controller.rb +++ b/app/controllers/api/v1/webhooks/social_inbox_controller.rb @@ -24,12 +24,10 @@ module Api ActivityPub.transaction do # Crea todos los registros necesarios y actualiza el estado - # - # 1. Actor - # 2. Instance - # 3. Object - # 4. ActivityPub - # 5. Activity + actor.present? + instance.present? + object.present? + activity_pub.present? activity.update_activity_pub_state! end rescue ActiveRecord::RecordInvalid => e