summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Product.pm
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-07-16 09:13:58 +0200
committerByron Jones <glob@mozilla.com>2015-07-16 09:13:58 +0200
commit028d2808ab935fc14e5367369e0d21ed394d0614 (patch)
tree21c327822117f7905c3f335794064ea5c4cec07b /Bugzilla/Product.pm
parentcfaf0d051df5c567c02ec83813fb58514cbf7efd (diff)
downloadbugzilla-028d2808ab935fc14e5367369e0d21ed394d0614.tar.gz
bugzilla-028d2808ab935fc14e5367369e0d21ed394d0614.tar.xz
Bug 1184456 - cannot create a new product with 'detect' as the default platform
Diffstat (limited to 'Bugzilla/Product.pm')
-rw-r--r--Bugzilla/Product.pm5
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();