diff --git a/app/Http/Controllers/FederationController.php b/app/Http/Controllers/FederationController.php index 92af6e7..a824912 100644 --- a/app/Http/Controllers/FederationController.php +++ b/app/Http/Controllers/FederationController.php @@ -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; diff --git a/tests/Feature/Http/Controllers/FederationControllerTest.php b/tests/Feature/Http/Controllers/FederationControllerTest.php index 2b78d57..cde99b2 100644 --- a/tests/Feature/Http/Controllers/FederationControllerTest.php +++ b/tests/Feature/Http/Controllers/FederationControllerTest.php @@ -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());