Sfoglia il codice sorgente

完善日志添加

hujingpei 4 anni fa
parent
commit
3578806502
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      apps/agent/views.py

+ 2 - 2
apps/agent/views.py

@@ -38,7 +38,7 @@ class AgentViewSet(CustomModelViewSet):
     def destroy(self, request, *args, **kwargs):
         instance = self.get_object()
         BizLog.objects.addnew(self.request.user, BizLog.DELETE,
-                              u'删除代理商[%s],id=%d' % (instance.username, instance.id))
+                              u'删除代理商[%s],id=%d' % (instance.name, instance.id))
         super(AgentViewSet, self).perform_destroy(instance)
         return response_ok()
 
@@ -66,7 +66,7 @@ class StoreViewSet(CustomModelViewSet):
     def destroy(self, request, *args, **kwargs):
         instance = self.get_object()
         BizLog.objects.addnew(self.request.user, BizLog.DELETE,
-                              u'删除门店[%s],id=%d' % (instance.username, instance.id))
+                              u'删除门店[%s],id=%d' % (instance.name, instance.id))
         super(StoreViewSet, self).perform_destroy(instance)
         return response_ok()