Skip to content

Conversation

ezilber-akamai-zz
Copy link
Contributor

📝 Description

Fixed issue when attempting to update Domain with some null values.

✔️ How to Test

Run tox.

Ticket: TPT-1871
Resolves #208

@ezilber-akamai-zz ezilber-akamai-zz requested a review from a team April 7, 2023 16:15
Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

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

@ezilber-akamai Maybe we could add a nullable field attribute corresponding to the nullable attributes in our API spec/docs, where these fields would always be included in .save() PUT requests. This would allow PUT endpoints that accept null as a valid value (e.g. IP update) to function as expected.

For example, the IP RDNS field here could look like this:

"rdns": Property(mutable=True, nullable=True),

and could then be included in PUT request bodies regardless of whether it's null or defined

{
    "rdns": null
}

@ezilber-akamai-zz
Copy link
Contributor Author

@lgarber-akamai Great idea! Is this something we would want to implement across the repo? If so, should we consider creating a separate ticket for this?

@ezilber-akamai-zz ezilber-akamai-zz merged commit 26987bf into linode:dev Apr 12, 2023
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.

Cannot update Domain type from master to slave
4 participants