Apply extract method to condition
This commit is contained in:
parent
1f3b0beddf
commit
51907b9545
@ -236,7 +236,7 @@ module.exports = class Aggregation extends BaseDataview {
|
||||
override = {};
|
||||
}
|
||||
|
||||
if (this.aggregationColumn && this._isFloatColumn === null) {
|
||||
if (this._shouldCheckColumnType()) {
|
||||
this._isFloatColumn = false;
|
||||
this.getColumnType(psql, this.aggregationColumn, this.queries.no_filters, function (err, type) {
|
||||
if (!err && !!type) {
|
||||
@ -266,6 +266,10 @@ module.exports = class Aggregation extends BaseDataview {
|
||||
return callback(null, aggregationSql);
|
||||
}
|
||||
|
||||
_shouldCheckColumnType () {
|
||||
return this.aggregationColumn && this._isFloatColumn === null;
|
||||
}
|
||||
|
||||
format (result) {
|
||||
const {
|
||||
count = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user