Fix for when no zones/echoareas have been created yet in a domain

This commit is contained in:
2024-05-29 18:59:44 +10:00
parent c414ebd053
commit 31770241ec
5 changed files with 25 additions and 9 deletions

View File

@@ -69,7 +69,8 @@ class Domain extends Model
public function getCanAcceptAppAttribute(): bool
{
return our_address($this)->count()
return ($x=our_address($this))
&& $x->count()
&& $this->active
&& $this->accept_app
&& Auth::id()