Skip to content

Commit

Permalink
[BF] Error when adding patch panel without Port name prefix - fixes i…
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo committed Oct 12, 2021
1 parent e5b55cd commit d61fc07
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Http/Controllers/PatchPanel/PatchPanelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,12 @@ public function create(): View
*/
public function store( StorePatchPanel $r ): RedirectResponse
{
$r->merge( [ 'location_notes' => clean( $r->location_notes ) ]);
$pp = PatchPanel::create( array_merge( $r->all(), [ 'active' => true ]) );
$pp = PatchPanel::create( $r->merge( [
'location_notes' => clean( $r->location_notes ),
'active' => true,
'port_prefix' => $r->port_prefix ?? '',
])->all()
);

// create the patch panel ports
$pp->createPorts( $r->numberOfPorts );
Expand Down

0 comments on commit d61fc07

Please sign in to comment.