fix enum
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
31619fb5aa
commit
f64ce142e4
|
@ -31,7 +31,7 @@ class UsedBySerializer(PassiveSerializer):
|
|||
model_name = CharField()
|
||||
pk = CharField()
|
||||
name = CharField()
|
||||
action = ChoiceField(choices=[(x.name, x.name) for x in DeleteAction])
|
||||
action = ChoiceField(choices=[(x.value, x.name) for x in DeleteAction])
|
||||
|
||||
|
||||
def get_delete_action(manager: Manager) -> str:
|
||||
|
|
|
@ -36,9 +36,7 @@ class SystemTaskSerializer(ModelSerializer):
|
|||
finish_timestamp = DateTimeField()
|
||||
duration = SerializerMethodField()
|
||||
|
||||
status = ChoiceField(
|
||||
choices=[(x.name, x.name) for x in TaskStatus],
|
||||
)
|
||||
status = ChoiceField(choices=[(x.value, x.name) for x in TaskStatus])
|
||||
messages = ListField(child=CharField())
|
||||
|
||||
def get_full_name(self, instance: SystemTask) -> str:
|
||||
|
|
|
@ -3265,10 +3265,10 @@
|
|||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"UNKNOWN",
|
||||
"SUCCESSFUL",
|
||||
"WARNING",
|
||||
"ERROR"
|
||||
"unknown",
|
||||
"successful",
|
||||
"warning",
|
||||
"error"
|
||||
],
|
||||
"title": "Status"
|
||||
},
|
||||
|
|
32
schema.yml
32
schema.yml
|
@ -42744,16 +42744,16 @@ components:
|
|||
- uuid
|
||||
SystemTaskStatusEnum:
|
||||
enum:
|
||||
- UNKNOWN
|
||||
- SUCCESSFUL
|
||||
- WARNING
|
||||
- ERROR
|
||||
- unknown
|
||||
- successful
|
||||
- warning
|
||||
- error
|
||||
type: string
|
||||
description: |-
|
||||
* `UNKNOWN` - UNKNOWN
|
||||
* `SUCCESSFUL` - SUCCESSFUL
|
||||
* `WARNING` - WARNING
|
||||
* `ERROR` - ERROR
|
||||
* `unknown` - UNKNOWN
|
||||
* `successful` - SUCCESSFUL
|
||||
* `warning` - WARNING
|
||||
* `error` - ERROR
|
||||
TOTPDevice:
|
||||
type: object
|
||||
description: Serializer for totp authenticator devices
|
||||
|
@ -43095,16 +43095,16 @@ components:
|
|||
- pk
|
||||
UsedByActionEnum:
|
||||
enum:
|
||||
- CASCADE
|
||||
- CASCADE_MANY
|
||||
- SET_NULL
|
||||
- SET_DEFAULT
|
||||
- cascade
|
||||
- cascade_many
|
||||
- set_null
|
||||
- set_default
|
||||
type: string
|
||||
description: |-
|
||||
* `CASCADE` - CASCADE
|
||||
* `CASCADE_MANY` - CASCADE_MANY
|
||||
* `SET_NULL` - SET_NULL
|
||||
* `SET_DEFAULT` - SET_DEFAULT
|
||||
* `cascade` - CASCADE
|
||||
* `cascade_many` - CASCADE_MANY
|
||||
* `set_null` - SET_NULL
|
||||
* `set_default` - SET_DEFAULT
|
||||
User:
|
||||
type: object
|
||||
description: User Serializer
|
||||
|
|
Reference in New Issue