web: fix date display issue
This commit is contained in:
parent
1f97aa09fa
commit
ff5f5f65e8
|
@ -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")
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue