mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Update test code.
This commit is contained in:
@@ -179,7 +179,15 @@ class AttachmentRepository implements AttachmentRepositoryInterface
|
||||
$attachment->filename = $data['filename'];
|
||||
}
|
||||
}
|
||||
// update model (move attachment)
|
||||
// should be validated already:
|
||||
if (array_key_exists('attachable_type', $data) && array_key_exists('attachable_id', $data)) {
|
||||
$attachment->attachable_id = (int)$data['attachable_id'];
|
||||
$attachment->attachable_type = sprintf('FireflyIII\\Models\\%s', $data['attachable_type']);
|
||||
}
|
||||
|
||||
$attachment->save();
|
||||
$attachment->refresh();
|
||||
if (array_key_exists('notes', $data)) {
|
||||
$this->updateNote($attachment, (string)$data['notes']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user