vinyldns / vinyldns/vinyldns-python
Date fields throw BadRequest
- Dominant language
- Python
- Stars
- 12
- Forks
- 24
- Avg merge
- 9d 13h
- Merged PRs (30d)
- 2
Description
Ran the following commands:
client = VinylDNSClient("http://localhost:9000", "xxx", "xxx")
existing_txt = [rs for rs in existing_records.record_sets if rs.type == "TXT"][0]
data_to_add = TXTData("some-test-txt-to-add")
existing_txt.records.append(data_to_add)
existing_txt.records
[<vinyldns.record.TXTData object at 0x102e970f0>, <vinyldns.record.TXTData object at 0x102e53e48>]
updated = client.update_record_set(existing_txt)
Traceback (most recent call last):
File "", line 1, in
File "/Users/rstar201/Desktop/Vinyl/python/vinyldns-python/src/vinyldns/client.py", line 519, in update_record_set
to_json_string(record_set), **kwargs)
File "/Users/rstar201/Desktop/Vinyl/python/vinyldns-python/src/vinyldns/client.py", line 157, in __make_request
return self.__check_response(response)
File "/Users/rstar201/Desktop/Vinyl/python/vinyldns-python/src/vinyldns/client.py", line 164, in __check_response
raise BadRequestError(response.text)
vinyldns.client.BadRequestError: {"errors":["Invalid date format 2019-06-25T16:37:09+00:00"]}
the api doesnt use created/update on an update_recordset call anyway, so i just cleared those fields to avoid it, but we should fix to make sure people dont run into this same issue
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.