修改log

This commit is contained in:
曹前明 2022-06-24 12:51:28 +08:00
parent 84847861c0
commit 238310208f
2 changed files with 2 additions and 2 deletions

View File

@ -361,7 +361,7 @@ class UserPostViewSet(CreateModelMixin, DestroyModelMixin, ListModelMixin, Custo
def perform_destroy(self, instance):
user = instance.user
instance.delete(update_by=self.request.user)
instance.delete()
up = UserPost.objects.filter(user=user).order_by('sort', 'create_time').first()
if up:
user.belong_dept = up.dept

View File

@ -338,7 +338,7 @@ LOGGING = {
},
# log 调用时需要当作参数传入
'log': {
'handlers': ['error', 'info', 'console'],
'handlers': ['error', 'info', 'console', 'default'],
'level': 'INFO',
'propagate': True
},