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

Commit 3ff155d

Browse files
SamSaffrontgxworld
andauthored
Update lib/personas/tools/edit_image.rb
Co-authored-by: Alan Guo Xiang Tan <[email protected]>
1 parent cbc57dd commit 3ff155d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/personas/tools/edit_image.rb

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

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

52-
uploads =
52+
sha1s =
5353
image_urls
5454
.map do |url|
55-
sha1 = Upload.sha1_from_short_url(url)
56-
Upload.find_by(sha1: sha1)
55+
Upload.sha1_from_short_url(url)
5756
end
5857
.compact
59-
.take(10)
58+
59+
uploads = Upload.where(sha1: sha1s).order(created_by: :asc).limit(10)
6060

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

0 commit comments

Comments
 (0)