File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed
app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer
lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,9 @@ protected function _getValue(DataObject $row)
97
97
}
98
98
return '' ;
99
99
}
100
- return $ row ->getData ($ this ->getColumn ()->getIndex ());
100
+ return $ this ->getColumn ()->getIndex () !== null
101
+ ? $ row ->getData ($ this ->getColumn ()->getIndex ())
102
+ : null ;
101
103
}
102
104
103
105
/**
Original file line number Diff line number Diff line change @@ -118,11 +118,14 @@ protected function _getCurrencyCode($row)
118
118
protected function _getRate ($ row )
119
119
{
120
120
if ($ rate = $ this ->getColumn ()->getRate ()) {
121
- return (float )$ rate ;
121
+ return (float ) $ rate ;
122
122
}
123
- if ($ rate = $ row ->getData ($ this ->getColumn ()->getRateField ())) {
124
- return (float )$ rate ;
123
+ $ rateField = $ this ->getColumn ()->getRateField ();
124
+
125
+ if ($ rateField !== null && $ rate = $ row ->getData ($ rateField )) {
126
+ return (float ) $ rate ;
125
127
}
128
+
126
129
return $ this ->_defaultBaseCurrency ->getRate ($ this ->_getCurrencyCode ($ row ));
127
130
}
128
131
Original file line number Diff line number Diff line change 10
10
use Magento \Framework \Api \AttributeValueFactory ;
11
11
12
12
/**
13
- * Class Document
13
+ * The document data provider
14
14
*/
15
15
class Document extends DataObject implements DocumentInterface
16
16
{
@@ -33,17 +33,23 @@ public function __construct(AttributeValueFactory $attributeValueFactory)
33
33
}
34
34
35
35
/**
36
+ * Gets ID.
37
+ *
36
38
* @return int|string
37
39
*/
38
40
public function getId ()
39
41
{
40
42
if (!$ this ->id ) {
41
- $ this ->id = $ this ->getData ($ this ->getIdFieldName ());
43
+ $ this ->id = $ this ->getIdFieldName () !== null
44
+ ? $ this ->getData ($ this ->getIdFieldName ())
45
+ : null ;
42
46
}
43
47
return $ this ->id ;
44
48
}
45
49
46
50
/**
51
+ * Sets ID.
52
+ *
47
53
* @param int $id
48
54
* @return void
49
55
*/
You can’t perform that action at this time.
0 commit comments