diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2010-04-07 03:00:01 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2010-04-07 03:00:01 +0200 |
commit | d89b27ae1cef6b82492fd6e833ca41d21f9527be (patch) | |
tree | 0ed6f20fda503ea250af33ec4f5da5fd3c4b10dc /Bugzilla | |
parent | c0771f4504ec5eff8de034a443c844d6effb8de0 (diff) | |
download | bugzilla-d89b27ae1cef6b82492fd6e833ca41d21f9527be.tar.gz bugzilla-d89b27ae1cef6b82492fd6e833ca41d21f9527be.tar.xz |
Bug 557686: PostgreSQL crashes when deleting a custom field of type Date/Time
r=mkanat a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Field.pm | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm index 31ace90e0..2513a19ae 100644 --- a/Bugzilla/Field.pm +++ b/Bugzilla/Field.pm @@ -822,17 +822,13 @@ sub remove_from_db { } else { $bugs_query = "SELECT COUNT(*) FROM bugs WHERE $name IS NOT NULL"; - if ($self->type != FIELD_TYPE_BUG_ID) { + if ($self->type != FIELD_TYPE_BUG_ID && $self->type != FIELD_TYPE_DATETIME) { $bugs_query .= " AND $name != ''"; } # Ignore the default single select value if ($self->type == FIELD_TYPE_SINGLE_SELECT) { $bugs_query .= " AND $name != '---'"; } - # Ignore blank dates. - if ($self->type == FIELD_TYPE_DATETIME) { - $bugs_query .= " AND $name != '00-00-00 00:00:00'"; - } } my $has_bugs = $dbh->selectrow_array($bugs_query); |