not admin

This commit is contained in:
caoqianming 2021-02-19 14:51:42 +08:00
parent 24b3874c56
commit 3feb75dc6d
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class RecordMixin():
`request.user` or `request.auth` is accessed.
"""
user = request.user
if request.method == 'GET':
if request.method == 'GET' and user.username != 'admin':
QueryRecord.objects.create(user=user,path=request.path,ip=request.META.get('HTTP_X_FORWARDED_FOR'),method=\
request.method,search=request.query_params.get('search',None),query=request.query_params)