From c4b527302f2f08c1a4387e9ef60e2bf8c853132f Mon Sep 17 00:00:00 2001 From: lian Date: Sat, 11 Mar 2017 11:29:05 +0800 Subject: [PATCH] admin remove unexisted user's deivce --- seahub/api2/endpoints/admin/devices.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/seahub/api2/endpoints/admin/devices.py b/seahub/api2/endpoints/admin/devices.py index c77bd7f12b..eb6b92b2c9 100644 --- a/seahub/api2/endpoints/admin/devices.py +++ b/seahub/api2/endpoints/admin/devices.py @@ -78,7 +78,7 @@ class AdminDevices(APIView): error_msg = 'device_id invalid.' return api_error(status.HTTP_400_BAD_REQUEST, error_msg) - if not user or not is_registered_user(user): + if not user: error_msg = 'user invalid.' return api_error(status.HTTP_400_BAD_REQUEST, error_msg) @@ -90,4 +90,3 @@ class AdminDevices(APIView): return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg) return Response({'success': True}) -