API Fix error when no fdb are found (#10125)

* Fix error when no fdb are found

* actually, it was totally broken...
fix untested

* missing device update

* cleanup

* Update api_functions.inc.php
This commit is contained in:
Tony Murray
2019-05-13 08:35:24 -05:00
committed by GitHub
parent 2187967854
commit c097747d77
2 changed files with 19 additions and 9 deletions

View File

@@ -534,6 +534,11 @@ class Device extends BaseModel
return $this->hasMany('App\Models\Port', 'device_id', 'device_id');
}
public function portsFdb()
{
return $this->hasMany('App\Models\PortsFdb', 'device_id', 'device_id');
}
public function portsNac()
{
return $this->hasMany('App\Models\PortsNac', 'device_id', 'device_id');