web: fix date display issue

This commit is contained in:
Jens Langhammer 2021-03-03 21:34:12 +01:00
parent 1f97aa09fa
commit ff5f5f65e8
3 changed files with 7 additions and 6 deletions

View file

@ -25,8 +25,8 @@ class TaskSerializer(Serializer):
task_finish_timestamp = DateTimeField(source="finish_timestamp")
status = ChoiceField(
source="result.status.name",
choices=[(x.name, x.name) for x in TaskResultStatus],
source="result.status.value",
choices=[(x.value, x.name) for x in TaskResultStatus],
)
messages = ListField(source="result.messages")

View file

@ -150,6 +150,7 @@ SWAGGER_SETTINGS = {
REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "authentik.api.pagination.Pagination",
"PAGE_SIZE": 100,
"DATETIME_FORMAT": "%s",
"DEFAULT_FILTER_BACKENDS": [
"rest_framework_guardian.filters.ObjectPermissionsFilter",
"django_filters.rest_framework.DjangoFilterBackend",

View file

@ -9332,11 +9332,11 @@ definitions:
format: date-time
status:
title: Status
type: string
type: integer
enum:
- SUCCESSFUL
- WARNING
- ERROR
- 1
- 2
- 4
messages:
description: ''
type: array