Skip to content

Fix crash on no translation in entity_translation producer #1015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 8.x-4.x
Choose a base branch
from

Conversation

OleksiiTsulun
Copy link

Fixes bug when entity_translation data producer tries to get entity's translation without checking if translation exists.

@codecov
Copy link

codecov bot commented May 28, 2020

Codecov Report

Merging #1015 into 8.x-4.x will decrease coverage by 0.31%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             8.x-4.x    #1015      +/-   ##
=============================================
- Coverage      54.74%   54.43%   -0.32%     
- Complexity       626      627       +1     
=============================================
  Files            113      113              
  Lines           1569     1578       +9     
=============================================
  Hits             859      859              
- Misses           710      719       +9     
Impacted Files Coverage Δ Complexity Δ
.../GraphQL/DataProducer/Entity/EntityTranslation.php 60.00% <100.00%> (ø) 9.00 <0.00> (+1.00)
src/Plugin/GraphQL/Schema/SdlSchemaPluginBase.php 41.50% <0.00%> (-4.33%) 19.00% <0.00%> (ø%)
...n/GraphQL/DataProducer/EntityDefinition/Fields.php 0.00% <0.00%> (ø) 12.00% <0.00%> (ø%)
...L/SchemaExtension/SdlSchemaExtensionPluginBase.php 0.00% <0.00%> (ø) 5.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d5ad05...10bc1ba. Read the comment docs.

Copy link
Contributor

@klausi klausi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, same as in #1016 : let's add a test case in EntityTest.php. We could also spin out all the entity language tests into their own test class to not make that one too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants