Skip to content

Commit

Permalink
Transformers: fix binary operation (#24604)
Browse files Browse the repository at this point in the history
* check the display name

* remove unchanged line

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
  • Loading branch information
ryantxu and dprokop committed May 13, 2020
1 parent f23ecc4 commit 97e2837
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -10,6 +10,7 @@ import { seriesToColumnsTransformer } from './seriesToColumns';
import { getTimeField } from '../../dataframe/processDataFrame';
import defaults from 'lodash/defaults';
import { BinaryOperationID, binaryOperators } from '../../utils/binaryOperators';
import { getFieldDisplayName } from '../../field';

export enum CalculateFieldMode {
ReduceRow = 'reduceRow',
Expand Down Expand Up @@ -182,7 +183,7 @@ function findFieldValuesWithNameOrConstant(frame: DataFrame, name: string): Vect
}

for (const f of frame.fields) {
if (f.name === name) {
if (name === getFieldDisplayName(f, frame)) {
return f.values;
}
}
Expand Down

0 comments on commit 97e2837

Please sign in to comment.