Bug 37288: Allow manual providers to be edited

There is a bug preventing manually created providers from being edited. This patch fixes that issue and allows providers to be edited if they have been created manually

Test plan:
1) Create a data provider in the ERM manually using the Create manually option
2) Click to edit that provider
3) The form will not load
4) Apply patch and run yarn build
5) Hard refresh the browser
6) The form should now load correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8872aa91e3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Matt Blenkinsop 2024-07-29 08:52:39 +00:00 committed by Lucas Gass
parent c87b670300
commit 04b7d7f1ff
1 changed files with 3 additions and 1 deletions

View File

@ -455,7 +455,7 @@ export default {
client.counter_registry.getAll({ name: query }).then(
registry_data => {
this.registry_data = registry_data
if (caller === "edit") {
if (caller === "edit" && registry_data.length > 0) {
this.selected_provider = registry_data.find(
platform =>
platform.name === this.usage_data_provider.name
@ -466,6 +466,8 @@ export default {
r => r.report_id === report.value
)
)
} else {
this.manual_form = true
}
this.searching = false
this.initialized = true