diff options
author | Byron Jones <glob@mozilla.com> | 2015-07-16 09:13:58 +0200 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-07-16 09:13:58 +0200 |
commit | 028d2808ab935fc14e5367369e0d21ed394d0614 (patch) | |
tree | 21c327822117f7905c3f335794064ea5c4cec07b | |
parent | cfaf0d051df5c567c02ec83813fb58514cbf7efd (diff) | |
download | bugzilla-028d2808ab935fc14e5367369e0d21ed394d0614.tar.gz bugzilla-028d2808ab935fc14e5367369e0d21ed394d0614.tar.xz |
Bug 1184456 - cannot create a new product with 'detect' as the default platform
-rw-r--r-- | Bugzilla/Product.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index 3e74b9afd..5837d8457 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -94,6 +94,11 @@ sub create { my $version = delete $params->{version}; my $create_series = delete $params->{create_series}; + # Some fields can be NULLs + foreach my $field (qw( default_op_sys_id default_platform_id )) { + $params->{$field} = undef if $params->{$field} eq ''; + } + my $product = $class->insert_create_data($params); Bugzilla->user->clear_product_cache(); |