]> BookStack Code Mirror - bookstack/commitdiff
entity needs to be saved after image upload and associate 1735/head
authorjakob <redacted>
Tue, 22 Oct 2019 09:18:08 +0000 (11:18 +0200)
committerjakob <redacted>
Tue, 22 Oct 2019 09:18:08 +0000 (11:18 +0200)
app/Entities/Repos/BaseRepo.php

index 78ce505b925ba5c6bcae78a325ce97c1cc601dd2..23f07f82049bc8342346b33c8b889c11f155755e 100644 (file)
@@ -82,6 +82,7 @@ class BaseRepo
             $this->imageRepo->destroyImage($entity->cover);
             $image = $this->imageRepo->saveNew($coverImage, 'cover_book', $entity->id, 512, 512, true);
             $entity->cover()->associate($image);
+            $entity->save();
         }
 
         if ($removeImage) {