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")
|
task_finish_timestamp = DateTimeField(source="finish_timestamp")
|
||||||
|
|
||||||
status = ChoiceField(
|
status = ChoiceField(
|
||||||
source="result.status.name",
|
source="result.status.value",
|
||||||
choices=[(x.name, x.name) for x in TaskResultStatus],
|
choices=[(x.value, x.name) for x in TaskResultStatus],
|
||||||
)
|
)
|
||||||
messages = ListField(source="result.messages")
|
messages = ListField(source="result.messages")
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,7 @@ SWAGGER_SETTINGS = {
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
"DEFAULT_PAGINATION_CLASS": "authentik.api.pagination.Pagination",
|
"DEFAULT_PAGINATION_CLASS": "authentik.api.pagination.Pagination",
|
||||||
"PAGE_SIZE": 100,
|
"PAGE_SIZE": 100,
|
||||||
|
"DATETIME_FORMAT": "%s",
|
||||||
"DEFAULT_FILTER_BACKENDS": [
|
"DEFAULT_FILTER_BACKENDS": [
|
||||||
"rest_framework_guardian.filters.ObjectPermissionsFilter",
|
"rest_framework_guardian.filters.ObjectPermissionsFilter",
|
||||||
"django_filters.rest_framework.DjangoFilterBackend",
|
"django_filters.rest_framework.DjangoFilterBackend",
|
||||||
|
|
|
@ -9332,11 +9332,11 @@ definitions:
|
||||||
format: date-time
|
format: date-time
|
||||||
status:
|
status:
|
||||||
title: Status
|
title: Status
|
||||||
type: string
|
type: integer
|
||||||
enum:
|
enum:
|
||||||
- SUCCESSFUL
|
- 1
|
||||||
- WARNING
|
- 2
|
||||||
- ERROR
|
- 4
|
||||||
messages:
|
messages:
|
||||||
description: ''
|
description: ''
|
||||||
type: array
|
type: array
|
||||||
|
|
Reference in New Issue