change media delete format..
This commit is contained in:
@ -37,7 +37,7 @@ class UpdateTransaction extends Job
|
||||
|
||||
// Upload attachment
|
||||
if ($this->request->file('attachment')) {
|
||||
$this->transaction->delete_attachment();
|
||||
$this->deleteMediaModel($this->transaction, 'attachment', $this->request);
|
||||
|
||||
foreach ($this->request->file('attachment') as $attachment) {
|
||||
$media = $this->getMedia($attachment, 'transactions');
|
||||
@ -45,7 +45,7 @@ class UpdateTransaction extends Job
|
||||
$this->transaction->attachMedia($media, 'attachment');
|
||||
}
|
||||
} elseif (!$this->request->file('attachment') && $this->transaction->attachment) {
|
||||
$this->transaction->delete_attachment();
|
||||
$this->deleteMediaModel($this->transaction, 'attachment', $this->request);
|
||||
}
|
||||
|
||||
// Recurring
|
||||
|
Reference in New Issue
Block a user