summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Version.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Version.pm')
-rw-r--r--Bugzilla/Version.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/Bugzilla/Version.pm b/Bugzilla/Version.pm
index e40a022c4..4270b1e5f 100644
--- a/Bugzilla/Version.pm
+++ b/Bugzilla/Version.pm
@@ -46,10 +46,9 @@ use constant DB_COLUMNS => qw(
product_id
);
-use constant REQUIRED_CREATE_FIELDS => qw(
- value
- product
-);
+use constant REQUIRED_FIELD_MAP => {
+ product_id => 'product',
+};
use constant UPDATE_COLUMNS => qw(
value
@@ -188,6 +187,8 @@ sub _check_value {
sub _check_product {
my ($invocant, $product) = @_;
+ $product || ThrowCodeError('param_required',
+ { function => "$invocant->create", param => 'product' });
return Bugzilla->user->check_can_admin_product($product->name);
}