Bug 410660: Updating a bug fails if there is a multi-select custom field - Patch by Ronaldo Maia <romaia@async.com.br> r/a=LpSolit

git-svn-id: svn://10.0.0.236/trunk@242310 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
lpsolit%gmail.com 2008-01-03 18:48:23 +00:00
parent 76675fa752
commit 2b9eaf72e5

View File

@ -1406,8 +1406,15 @@ sub _set_global_validator {
my ($self, $value, $field) = @_;
my $current = $self->$field;
my $privs;
$current = $current->id if ref $current && $current->isa('Bugzilla::Object');
$value = $value->id if ref $value && $value->isa('Bugzilla::Object');
if (ref $current && ref($current) ne 'ARRAY'
&& $current->isa('Bugzilla::Object')) {
$current = $current->id ;
}
if (ref $value && ref($value) ne 'ARRAY'
&& $value->isa('Bugzilla::Object')) {
$value = $value->id ;
}
my $can = $self->check_can_change_field($field, $current, $value, \$privs);
if (!$can) {
if ($field eq 'assigned_to' || $field eq 'qa_contact') {