-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1242562 [Elasticsearch] Prevent automatic ES requests during model A…
…PI calls
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/src/Bridge/Elasticsearch/DataProvider/CollectionDataProvider.php b/src/Bridge/Elasticsearch/DataProvider/CollectionDataProvider.php | ||
index b69f0083a..e410c10bd 100644 | ||
--- a/src/Bridge/Elasticsearch/DataProvider/CollectionDataProvider.php | ||
+++ b/src/Bridge/Elasticsearch/DataProvider/CollectionDataProvider.php | ||
@@ -64,7 +64,7 @@ final class CollectionDataProvider implements ContextAwareCollectionDataProvider | ||
{ | ||
try { | ||
$resourceMetadata = $this->resourceMetadataFactory->create($resourceClass); | ||
- if (false === $resourceMetadata->getCollectionOperationAttribute($operationName, 'elasticsearch', true, true)) { | ||
+ if (false === $resourceMetadata->getCollectionOperationAttribute($operationName, 'elasticsearch', false, true)) { | ||
return false; | ||
} | ||
} catch (ResourceClassNotFoundException $e) { | ||
diff --git a/src/Bridge/Elasticsearch/DataProvider/ItemDataProvider.php b/src/Bridge/Elasticsearch/DataProvider/ItemDataProvider.php | ||
index 9d3fcb1c7..4cce1b9a2 100644 | ||
--- a/src/Bridge/Elasticsearch/DataProvider/ItemDataProvider.php | ||
+++ b/src/Bridge/Elasticsearch/DataProvider/ItemDataProvider.php | ||
@@ -58,7 +58,7 @@ final class ItemDataProvider implements ItemDataProviderInterface, RestrictedDat | ||
{ | ||
try { | ||
$resourceMetadata = $this->resourceMetadataFactory->create($resourceClass); | ||
- if (false === $resourceMetadata->getItemOperationAttribute($operationName, 'elasticsearch', true, true)) { | ||
+ if (false === $resourceMetadata->getItemOperationAttribute($operationName, 'elasticsearch', false, true)) { | ||
return false; | ||
} | ||
} catch (ResourceClassNotFoundException $e) { |