import user
This commit is contained in:
parent
d4004c7544
commit
a8d3598288
|
@ -228,7 +228,7 @@ class ConsumerViewSet(ModelViewSet):
|
|||
try:
|
||||
workscopeobj = WorkScope.objects.get(name=workscope)
|
||||
obj.workscope = workscopeobj
|
||||
PaySubject.objects.create(subject=workscopeobj.subject, consumer = obj)
|
||||
PaySubject.objects.get_or_create(subject=workscopeobj.subject, consumer = obj)
|
||||
except:
|
||||
return Response({"error":"工作类别不存在!"})
|
||||
obj.save()
|
||||
|
|
Loading…
Reference in New Issue