Allow empty datetime fields in APIToken model admin.

Review Request #12526 — Created Aug. 10, 2022 and submitted — Latest diff uploaded

Information

Djblets
release-3.x

Reviewers

The APIToken model includes several datetime fields which are allowed
to be blank (such as invalidation or expiration). However, the
definitions of these fields were missing blank=True, which meant that
the auto-generated form used in the admin site showed these fields as
required. This change fixes that.

Was able to save an APIToken with these fields as blank.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Allow empty datetime fields in APIToken model admin.
The `APIToken` model includes several datetime fields which are allowed to be blank (such as invalidation or expiration). However, the definitions of these fields were missing `blank=True`, which meant that the auto-generated form used in the admin site showed these fields as required. This change fixes that. Testing Done: Was able to save an APIToken with these fields as blank.
dd159f01c9196ee2d3871f4685c6240697182d4d David Trowbridge
djblets/webapi/models.py
Loading...