mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Use find_by_id method to prevent record not found exception
This commit is contained in:
@@ -513,7 +513,7 @@ class CookedPostProcessor
|
||||
end
|
||||
|
||||
upload_id = downloaded_images[src]
|
||||
upload = Upload.find(upload_id) if upload_id
|
||||
upload = Upload.find_by_id(upload_id) if upload_id
|
||||
img["src"] = upload.url if upload.present?
|
||||
|
||||
# make sure we grab dimensions for oneboxed images
|
||||
|
Reference in New Issue
Block a user