Fix domain limit count caching

This commit is contained in:
Julien Nahum
2023-12-12 11:57:13 +01:00
parent 7f632b9cb8
commit 77ff8637b3
2 changed files with 3 additions and 4 deletions

View File

@@ -2,7 +2,6 @@
namespace App\Models;
use App\Http\Requests\AnswerFormRequest;
use App\Models\Forms\Form;
use App\Models\Traits\CachableAttributes;
use App\Models\Traits\CachesAttributes;
@@ -71,7 +70,7 @@ class Workspace extends Model implements CachableAttributes
return null;
}
return $this->remember('custom_domain_count', 15 * 60, function(): int {
return $this->remember('custom_domain_count', 15 * 60, function(): ?int {
foreach ($this->owners as $owner) {
if ($owner->is_subscribed) {
if ($license = $owner->activeLicense()) {