summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-06-23 17:39:11 -0700
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-06-23 17:39:11 -0700
commit8f33041e6542f12e6897ef6ed7a67c43a118c504 (patch)
treec5caf60f706dfa1043a69e135b5246bd63455aae /Bugzilla/Flag.pm
parentBug 509303: Update the CGI.pm requirement to 3.49 to make redirection (diff)
downloadbugzilla-8f33041e6542f12e6897ef6ed7a67c43a118c504.tar.gz
bugzilla-8f33041e6542f12e6897ef6ed7a67c43a118c504.tar.bz2
bugzilla-8f33041e6542f12e6897ef6ed7a67c43a118c504.zip
Bug 572602: Change the way that Bugzilla::Object determines what fields
are required for create(). It now assumes that any column that is NOT NULL and has not DEFAULT in the database is required. We also shift the burden of throwing errors about empty values to the validators. This fixes the bug that Bugzilla::Bug->create() wasn't populating default values for fields if they weren't specified in the create() parameters. r=timello, a=mkanat
Diffstat (limited to 'Bugzilla/Flag.pm')
-rw-r--r--Bugzilla/Flag.pm9
1 files changed, 1 insertions, 8 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index 3dccd7a02..308eb64d1 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -87,14 +87,6 @@ use constant DB_COLUMNS => qw(
status
);
-use constant REQUIRED_CREATE_FIELDS => qw(
- attach_id
- bug_id
- setter_id
- status
- type_id
-);
-
use constant UPDATE_COLUMNS => qw(
requestee_id
setter_id
@@ -429,6 +421,7 @@ sub create {
$params->{$_} = $flag->{$_} foreach @columns;
$params->{creation_date} = $params->{modification_date} = $timestamp;
+
$flag = $class->SUPER::create($params);
return $flag;
}