Create a TokenExpiresFieldType.
Review Request #12604 — Created Sept. 15, 2022 and submitted
While adding the UI for setting expiration dates on Review Board's API tokens,
we ran into a blocker for setting the expiration to a null value (i.e. giving
the token no expiration date). This is because our API request fields don't
support null values, they expect a value to be set for the given field.Rather than tackling this concept of allowing null values for all request
fields right now (this should be done eventually though), this change simply
creates a specializedTokenExpiresFieldType
which will allow null values as
well as date/time values that are supported by theDateTimeFieldType
.
- Created unit tests for the new field type and ran tests in
djblets.webapi.tests.test_fields.py
- Manually tested setting the expiration date to empty strings and
null values through the API.
Summary | ID |
---|---|
cf297492119d79f73cee7a70e21f76fdd75b3311 |
Description | From | Last Updated |
---|---|---|
no newline at end of file Column: 69 Error code: W292 |
reviewbot |