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

Fix/standardize some patch commands #236

Merged
merged 1 commit into from
May 22, 2024

Conversation

pederhan
Copy link
Member

This PR fixes/standardizes the behavior of some patch commands discovered when developing #235.

@pederhan pederhan requested a review from terjekv May 21, 2024 11:08
Comment on lines +1601 to +1602
# Model converts empty string to None so we must validate this ourselves.
patched = self.patch(fields={"macaddress": ""}, validate=False)
Copy link
Member Author

Choose a reason for hiding this comment

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

Should look into having "" equal None when validating perhaps, but I fear that could create some hard to track down bugs unless we are certain this behavior is consistent in the API (which seems unlikely?!).

@pederhan pederhan merged commit 29d6d81 into migrate_to_pydantic May 22, 2024
4 of 8 checks passed
@pederhan pederhan deleted the patch-command-fixes branch May 22, 2024 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant