适配Django 4.2
This commit is contained in:
parent
95da12f63a
commit
7c6be79974
2 changed files with 8 additions and 3 deletions
|
@ -21,9 +21,9 @@ class RunOrderAPI:
|
|||
def run_order(self, data: RunOrderSchema):
|
||||
if data.level < 1 or data.level > 3:
|
||||
raise APIException("贸易站等级错误")
|
||||
if data.skill not in RunOrder.SKILL_CHOICES:
|
||||
if data.skill not in [i[0] for i in RunOrder.SKILL_CHOICES]:
|
||||
raise APIException("跑单技能错误")
|
||||
if data.level != 3 and data.skill == "t":
|
||||
if data.level != 3 and data.skill == RunOrder.Tequila:
|
||||
raise APIException("跑单技能与贸易站等级不匹配")
|
||||
version = MowerVersion.objects.get_or_create(version=data.version)[0]
|
||||
anonymous = AnonymousUser.objects.get_or_create(uuid=data.uuid)[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue