Skip to content
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

Ignore if populating a scalar attribute #14032

Merged
merged 2 commits into from Aug 11, 2022
Merged

Ignore if populating a scalar attribute #14032

merged 2 commits into from Aug 11, 2022

Conversation

petersg83
Copy link
Contributor

What does it do?

Ignore instead of throwing an error when a query tried to populate a scalar attributes
NB: it is already this behavior when trying to populate an attribute that doesn't exist

Why is it needed?

To avoid error 500 in certain usecases.
Example :
When 2 components in a dynamic zone have the same field name but one is a relation and the other is a string.

How to test it?

The test was updated

@petersg83 petersg83 added source: core:database Source is core/database package pr: fix This PR is fixing a bug labels Aug 9, 2022
@petersg83 petersg83 added this to the 4.3.3 milestone Aug 9, 2022
@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #14032 (c115e26) into master (36ecf8c) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master   #14032   +/-   ##
=======================================
  Coverage   55.35%   55.35%           
=======================================
  Files        1258     1258           
  Lines       31699    31699           
  Branches     5734     5734           
=======================================
  Hits        17546    17546           
  Misses      12337    12337           
  Partials     1816     1816           
Flag Coverage Δ
front 58.10% <ø> (ø)
unit 48.60% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ckages/core/database/lib/query/helpers/populate.js 2.97% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@alexandrebodin alexandrebodin removed this from the 4.3.3 milestone Aug 10, 2022
@petersg83 petersg83 added this to the 4.3.5 milestone Aug 11, 2022
@petersg83 petersg83 merged commit d49d687 into master Aug 11, 2022
@petersg83 petersg83 deleted the fix/populate-dz branch August 11, 2022 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: core:database Source is core/database package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants