浏览代码

门店管理

hujingpei 4 年之前
父节点
当前提交
8a2e031f09
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      apps/agent/views.py

+ 2 - 2
apps/agent/views.py

@@ -54,7 +54,7 @@ class StoreViewSet(CustomModelViewSet):
         super(StoreViewSet, self).perform_destroy(instance)
         return response_ok()
 
-    @action(methods=['post'], detail=False)
+    @action(methods=['post'], detail=True)
     def check(self, request, pk):
         # 审核
         status = request.POST.get('status')
@@ -62,7 +62,7 @@ class StoreViewSet(CustomModelViewSet):
             instance = Store.objects.filter(id=pk).first()
             if not instance:
                 raise CustomError('当前门店信息有误!')
-            if instance.status > settings.NOT_CHECKED :
+            if instance.status > settings.DEFAULT:
                 raise CustomError('当前企业已审核!')
 
             instance.check_user = self.request.user