Add missing const to parent() and children() relations
This commit is contained in:
parent
535a082edd
commit
5b7ec1a629
@ -193,10 +193,12 @@ class Address extends Model
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case self::NODE_UNKNOWN:
|
|
||||||
case self::NODE_ACTIVE:
|
case self::NODE_ACTIVE:
|
||||||
case self::NODE_POINT:
|
|
||||||
case self::NODE_PVT:
|
case self::NODE_PVT:
|
||||||
|
case self::NODE_HOLD:
|
||||||
|
case self::NODE_DOWN:
|
||||||
|
case self::NODE_POINT:
|
||||||
|
case self::NODE_UNKNOWN:
|
||||||
// Nodes dont have children, but must return a relationship instance
|
// Nodes dont have children, but must return a relationship instance
|
||||||
return $this->hasOne(self::class,NULL,'void');
|
return $this->hasOne(self::class,NULL,'void');
|
||||||
|
|
||||||
@ -344,6 +346,9 @@ class Address extends Model
|
|||||||
case self::NODE_HC:
|
case self::NODE_HC:
|
||||||
// Normal Nodes
|
// Normal Nodes
|
||||||
case self::NODE_ACTIVE:
|
case self::NODE_ACTIVE:
|
||||||
|
case self::NODE_PVT:
|
||||||
|
case self::NODE_HOLD:
|
||||||
|
case self::NODE_DOWN:
|
||||||
// If we are a child of a hub, then check our hub
|
// If we are a child of a hub, then check our hub
|
||||||
$parent = ($this->hub_id
|
$parent = ($this->hub_id
|
||||||
? self::where('id',$this->hub_id)
|
? self::where('id',$this->hub_id)
|
||||||
@ -358,7 +363,6 @@ class Address extends Model
|
|||||||
|
|
||||||
case self::NODE_UNKNOWN:
|
case self::NODE_UNKNOWN:
|
||||||
case self::NODE_POINT:
|
case self::NODE_POINT:
|
||||||
case self::NODE_DOWN:
|
|
||||||
// @todo Points - if the boss is defined, we should return it.
|
// @todo Points - if the boss is defined, we should return it.
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user