Skip to content

Commit

Permalink
fix name bug
Browse files Browse the repository at this point in the history
  • Loading branch information
temaotl committed May 24, 2024
1 parent 5224feb commit 28d3b6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion app/Http/Controllers/FederationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,12 @@ public function update(UpdateFederation $request, Federation $federation)
$this->authorize('update', $federation);

$validated = $request->validated();
$id = generateFederationID($validated['name']);

$id = $federation->name;
if(isset($validated['name']))
{
$id = generateFederationID($validated['name']);
}
$additionalFilters = $request->input('sp_and_ip_feed', 0);
$filters = $id;

Expand Down
5 changes: 1 addition & 4 deletions tests/Feature/Http/Controllers/FederationControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -904,10 +904,7 @@ public function an_admin_can_edit_an_existing_federation()
->assertSeeText($federation->name)
->assertSeeText($federation->description)
->assertSeeText($federation->xml_id)
->assertSeeText($federation->xml_name)
->assertSeeText($federation->tagfile)
->assertSeeText($federation->cfgfile)
->assertSeeText($federation->filters);
->assertSeeText($federation->xml_name);

$this->assertEquals(route('federations.show', $federation), url()->current());

Expand Down

0 comments on commit 28d3b6d

Please sign in to comment.