Fix for finding the TIC origin, it doesnt have a parent

This commit is contained in:
Deon George 2023-12-13 08:58:13 +11:00
parent caa6e629f4
commit b9bc413b05

View File

@ -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();
}
/**