Fix for finding the TIC origin, it doesnt have a parent
This commit is contained in:
parent
caa6e629f4
commit
b9bc413b05
@ -203,7 +203,7 @@ class File extends Model
|
||||
|
||||
public function getOriginAttribute(): Address
|
||||
{
|
||||
return $this->path->sortBy('parent_id')->last();
|
||||
return $this->path->where('pivot.parent_id','=',NULL)->pop();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user