Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 4ba0f47

Browse files
committed
fix implementation
1 parent bf51ede commit 4ba0f47

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/personas/tools/edit_image.rb

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,9 @@ def invoke
4949

5050
return { prompt: prompt, error: "No valid images provided" } if image_urls.blank?
5151

52-
sha1s =
53-
image_urls
54-
.map do |url|
55-
Upload.sha1_from_short_url(url)
56-
end
57-
.compact
58-
59-
uploads = Upload.where(sha1: sha1s).order(created_by: :asc).limit(10)
52+
sha1s = image_urls.map { |url| Upload.sha1_from_short_url(url) }.compact
53+
54+
uploads = Upload.where(sha1: sha1s).order(created_at: :asc).limit(10).to_a
6055

6156
return { prompt: prompt, error: "No valid images provided" } if uploads.blank?
6257

0 commit comments

Comments
 (0)