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

ZoneRecordInput omits empty name when serialized to json #451

Open
jocelynthode opened this issue Jul 3, 2024 · 1 comment
Open

ZoneRecordInput omits empty name when serialized to json #451

jocelynthode opened this issue Jul 3, 2024 · 1 comment
Labels

Comments

@jocelynthode
Copy link

Hey, when trying to create a record at the apex I get a 400:

Reason: Bad Request
HTTP response body: {"message":"Validation failed","errors":{"name":["can't be null"]}}

Here is the code:

record = ZoneRecordInput(name="", type="CAA", ttl=60, content='0 issuewild "sectigo.com"')
client.zones.create_record(
                account_id,
                "example.com",
                record,
            )

The to_json() function removes empty fields and thus removed the name. However this field is required when using create_record making it impossible to create an apex level record.

@weppos weppos added the triage Issues that are opened and need to be investigated. label Jul 15, 2024
@dallasread
Copy link
Member

Thanks for pointing this out, @jocelynthode. We'll have a look!

@dallasread dallasread added bug and removed triage Issues that are opened and need to be investigated. labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants