Skip to content

Commit 52eaf88

Browse files
committed
MAGETWO-45447: SQL error after search in Billing Agreements grid in Admin
- Fixed tests
1 parent 762e1a8 commit 52eaf88

File tree

1 file changed

+4
-9
lines changed
  • app/code/Magento/Paypal/Model/ResourceModel/Billing/Agreement

1 file changed

+4
-9
lines changed

app/code/Magento/Paypal/Model/ResourceModel/Billing/Agreement/Collection.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
namespace Magento\Paypal\Model\ResourceModel\Billing\Agreement;
77

8-
use Magento\Customer\Api\CustomerMetadataInterface;
9-
108
/**
119
* Billing agreements resource collection
1210
*/
@@ -92,17 +90,14 @@ public function addCustomerDetails()
9290
}
9391

9492
/**
95-
* Add field filter to collection
96-
*
97-
* @param array|string $field
98-
* @param null|string|array $condition
99-
* @return $this
93+
* @inheritdoc
10094
*/
10195
public function addFieldToFilter($field, $condition = null)
10296
{
103-
if (in_array($field , ['created_at', 'updated_at'])) {
104-
$field = 'main_table.' .$field;
97+
if (in_array($field, ['created_at', 'updated_at'], true)) {
98+
$field = 'main_table.' . $field;
10599
}
100+
106101
return parent::addFieldToFilter($field, $condition);
107102
}
108103
}

0 commit comments

Comments
 (0)