From 89b4cce04cfe0ce546a085d2417023c909f3650e Mon Sep 17 00:00:00 2001 From: f Date: Fri, 14 Feb 2020 12:11:55 -0300 Subject: [PATCH] no fallar si el post no se encuentra --- app/services/post_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/post_service.rb b/app/services/post_service.rb index 1745290f..85a40ee8 100644 --- a/app/services/post_service.rb +++ b/app/services/post_service.rb @@ -53,6 +53,7 @@ PostService = Struct.new(:site, :usuarie, :post, :params, keyword_init: true) do post = posts.find(uuid, uuid: true) order = reorder[uuid].to_i + next unless post next unless post.attributes.include? :order next if post.order.value == order