diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2012-02-29 00:00:12 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-02-29 00:00:12 +0100 |
commit | ec2e4a0902dcfcde12af568fa40f70bdd6114b0e (patch) | |
tree | 5b403386346d67fe0a15c15e371a630e59251bb0 | |
parent | 38cbb6ac784948b93728cc25259187580e5bb813 (diff) | |
download | bugs-ec2e4a0902dcfcde12af568fa40f70bdd6114b0e.tar bugs-ec2e4a0902dcfcde12af568fa40f70bdd6114b0e.tar.gz bugs-ec2e4a0902dcfcde12af568fa40f70bdd6114b0e.tar.bz2 bugs-ec2e4a0902dcfcde12af568fa40f70bdd6114b0e.tar.xz bugs-ec2e4a0902dcfcde12af568fa40f70bdd6114b0e.zip |
Bug 528918: Bugzilla::Object->match() shouldn't call _check_field() when the field being passed can be trusted (deserialising the DB schema is slow)
r=dkl a=LpSolit
-rw-r--r-- | Bugzilla/Object.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index 1b0af509d..c606540fa 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -214,8 +214,11 @@ sub match { } next; } - - $class->_check_field($field, 'match'); + + # It's always safe to use the field defined by classes as being + # their ID field. In particular, this means that new_from_list() + # is exempted from this check. + $class->_check_field($field, 'match') unless $field eq $class->ID_FIELD; if (ref $value eq 'ARRAY') { # IN () is invalid SQL, and if we have an empty list |