feat: 排序为0的为默认工作类别
This commit is contained in:
parent
bb1b6d8994
commit
9c23703c63
|
@ -625,7 +625,7 @@ class ConsumerRegister(APIView):
|
||||||
# 默认一个工作类别
|
# 默认一个工作类别
|
||||||
if not consumer.workscope:
|
if not consumer.workscope:
|
||||||
try:
|
try:
|
||||||
consumer.workscope = WorkScope.objects.filter(sortnum=1).order_by('id').first()
|
consumer.workscope = WorkScope.objects.filter(sortnum=0).order_by('id').first()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
consumer.save()
|
consumer.save()
|
||||||
|
@ -641,7 +641,7 @@ class ConsumerRegister(APIView):
|
||||||
# 默认一个工作类别
|
# 默认一个工作类别
|
||||||
if not consumer.workscope:
|
if not consumer.workscope:
|
||||||
try:
|
try:
|
||||||
consumer.workscope = WorkScope.objects.filter(sortnum=1).order_by('id').first()
|
consumer.workscope = WorkScope.objects.filter(sortnum=0).order_by('id').first()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
consumer.save()
|
consumer.save()
|
||||||
|
|
Loading…
Reference in New Issue