Skip to content

Commit

Permalink
Fix re-triggering scheduled products with falsy required params
Browse files Browse the repository at this point in the history
It is possible to set required parameters to falsy values when
scheduling a product, e.g. `VERSION=0`. This changes allows
re-triggering such a scheduled product without running into a
validation error.
  • Loading branch information
Martchus committed Jul 4, 2023
1 parent aa85372 commit 1d5e54b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/OpenQA/WebAPI/Controller/API/V1/Iso.pm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ sub create {
}
my $settings_to_clone = $previously_scheduled_product->settings // {};
for my $required_param (MANDATORY_PARAMETERS) {
if (!$settings_to_clone->{$required_param}) {
if (!defined $settings_to_clone->{$required_param}) {
return $self->render(
text => "Scheduled product to clone settings from misses $required_param.",
status => 404
Expand Down

0 comments on commit 1d5e54b

Please sign in to comment.