Bug 557686: PostgreSQL crashes when deleting a custom field of type Date/Time
r=mkanat a=LpSolit git-svn-id: svn://10.0.0.236/branches/BUGZILLA-3_6-BRANCH@260161 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1 +1 @@
|
||||
7073
|
||||
7074
|
||||
@@ -722,17 +722,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);
|
||||
|
||||
Reference in New Issue
Block a user