From ed890ebd102089e20e5f696c228f1a381c4e1fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20V=C3=A9zina?= Date: Fri, 9 Aug 2024 10:48:03 -0400 Subject: [PATCH] Fix wrong crops for Blocks --- src/Commands/RefreshCrops.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Commands/RefreshCrops.php b/src/Commands/RefreshCrops.php index f7a47e54a..1a6750611 100755 --- a/src/Commands/RefreshCrops.php +++ b/src/Commands/RefreshCrops.php @@ -106,9 +106,10 @@ public function handle() $this->roleName = $this->argument('roleName'); - $mediasParams = app($this->modelName)->getMediasParams(); - if (empty($mediasParams)) { + if (app($this->modelName) instanceof \A17\Twill\Models\Block) { $mediasParams = TwillBlocks::getAllCropConfigs(); + } else { + $mediasParams = app($this->modelName)->getMediasParams(); } if (! isset($mediasParams[$this->roleName])) {