Compare commits

..

2 Commits

Author SHA1 Message Date
b02c1f07a2 Remove deprecated Domain::managed()
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 38s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m48s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
2024-05-29 19:13:28 +10:00
c694280081 Fix for when no zones have been created yet in a domain
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 39s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m54s
Create Docker Image / Final Docker Image Manifest (push) Successful in 11s
2024-05-29 18:59:44 +10:00

View File

@ -69,8 +69,7 @@ class Domain extends Model
public function getCanAcceptAppAttribute(): bool public function getCanAcceptAppAttribute(): bool
{ {
return ($x=our_address($this)) return our_address($this)->count()
&& $x->count()
&& $this->active && $this->active
&& $this->accept_app && $this->accept_app
&& Auth::id() && Auth::id()
@ -131,10 +130,9 @@ class Domain extends Model
*/ */
public function isManaged(): bool public function isManaged(): bool
{ {
return ($x=our_address()) $x = our_address();
&& $x->pluck('zone.domain')
->pluck('id') return $x && $x->pluck('zone.domain')->pluck('id')->contains($this->id);
->contains($this->id);
} }
/** /**