Fix for finding the TIC origin, it doesnt have a parent
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user