Skip to content
Snippets Groups Projects
Commit 78d30cc7 authored by Jared Hancock's avatar Jared Hancock
Browse files

thread: Fix crash editing thread entry with inline image

This fixes an InconsistentModelException error when editing thread
entries with inline images. The fix assumes that inline images are
re-attached when a new ThreadEntry is created and the body is copied
from the previous entry. Only the non-inline attachments need to be
moved in the update query.
parent b9f0937b
No related branches found
No related tags found
No related merge requests found
...@@ -165,7 +165,9 @@ JS ...@@ -165,7 +165,9 @@ JS
} }
// Move the attachments to the new entry // Move the attachments to the new entry
$old->attachments->update(array( $old->attachments->filter(array(
'inline' => false,
))->update(array(
'object_id' => $entry->id 'object_id' => $entry->id
)); ));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment