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

Revert "Fix empty string nullification" #342

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

jordanbreen28
Copy link
Contributor

@jordanbreen28 jordanbreen28 commented Sep 20, 2024

Reverts #292

Fixes #340

@jordanbreen28
Copy link
Contributor Author

hey @Clebam we've had to revert #292 due to this issue arising #340. We've added an action item to investigate another fix for this and will be assigned to one of the team soon. Thanks for your understanding

@jordanbreen28 jordanbreen28 marked this pull request as ready for review September 20, 2024 11:04
@jordanbreen28 jordanbreen28 requested a review from a team as a code owner September 20, 2024 11:04
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.08%. Comparing base (a08de93) to head (7dfca90).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #342   +/-   ##
=======================================
  Coverage   92.08%   92.08%           
=======================================
  Files           6        6           
  Lines         720      720           
=======================================
  Hits          663      663           
  Misses         57       57           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@alex501212 alex501212 left a comment

Choose a reason for hiding this comment

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

LGTM

@alex501212 alex501212 merged commit 9db01de into main Sep 20, 2024
8 checks passed
@alex501212 alex501212 deleted the revert-292-fix_empty_string_nullification branch September 20, 2024 11:32
@Clebam
Copy link
Contributor

Clebam commented Sep 21, 2024

Hi @jordanbreen28,

it seems the check on Enum was too wide indeed.

data[nil_attr] = '' if (attribute_type.start_with?('Optional[Enum[', 'Enum[')) && enum_values(context, nil_attr).include?('')) || attribute_type == 'String'

This is what I intended to do.

david22swan added a commit that referenced this pull request Sep 25, 2024
Reinstating reverted change by Clebam with additional fix suggested by original author.

Original Fix: #292
Revert: #342
Reason for revert: #340
david22swan added a commit that referenced this pull request Sep 25, 2024
Reinstating reverted change by Clebam with additional fix suggested by original author.

Original PR: #292
Revert PR: #342
Reason for revert: #340
Original author: https://github.com/Clebam
garrettrowell pushed a commit to garrettrowell/ruby-pwsh that referenced this pull request Oct 17, 2024
Reinstating reverted change by Clebam with additional fix suggested by original author.

Original PR: puppetlabs#292
Revert PR: puppetlabs#342
Reason for revert: puppetlabs#340
Original author: https://github.com/Clebam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optional parameter not working with pwshlib 1.2.0
3 participants