From 0a4d5e4628cab73bed31b79964c52d82e1ba4e12 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Fri, 24 Mar 2023 11:48:55 +0100 Subject: [PATCH] MT#56693 fix parent sound sets list for sound set creation * in a scenario when a sound set was "edited" and then a new one created, in the creation dialog the previously edited sound set was missing in the list of available parents Change-Id: I8d7652a9f7f881be6d700dc4f6cf77dc426261e7 --- lib/NGCP/Panel/Controller/Sound.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/NGCP/Panel/Controller/Sound.pm b/lib/NGCP/Panel/Controller/Sound.pm index 06f4bee585..5273263229 100644 --- a/lib/NGCP/Panel/Controller/Sound.pm +++ b/lib/NGCP/Panel/Controller/Sound.pm @@ -175,6 +175,8 @@ sub base :Chained('sets_list') :PathPart('') :CaptureArgs(1) { NGCP::Panel::Utils::Navigation::back_or($c, $c->uri_for('/sound')); } + delete $c->session->{edit_sound_set_id}; + my $res = $c->stash->{sets_rs}->find($set_id); unless(defined($res)) { NGCP::Panel::Utils::Message::error( @@ -364,6 +366,8 @@ sub delete_sound :Chained('base') :PathPart('delete') { sub create :Chained('sets_list') :PathPart('create') :Args() { my ($self, $c, $contract_id) = @_; + delete $c->session->{edit_sound_set_id}; + my $posted = ($c->request->method eq 'POST'); my $form; my $params = {};