fix: 修改访问swagger会产生的错误

This commit is contained in:
ibuler
2020-12-11 17:21:52 +08:00
committed by Jiangjie.Bai
parent f9cf2a243b
commit b9717eece3
10 changed files with 62 additions and 2 deletions

View File

@@ -62,6 +62,8 @@ class Action:
@classmethod
def value_to_choices(cls, value):
if isinstance(value, list):
return value
value = int(value)
choices = [cls.NAME_MAP[i] for i, j in cls.DB_CHOICES if value & i == i]
return choices