mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 18:29:23 +00:00
Merge pull request #1511 from haiwen/admin-del-device
admin remove unexisted user's deivce
This commit is contained in:
@@ -78,7 +78,7 @@ class AdminDevices(APIView):
|
|||||||
error_msg = 'device_id invalid.'
|
error_msg = 'device_id invalid.'
|
||||||
return api_error(status.HTTP_400_BAD_REQUEST, error_msg)
|
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.'
|
error_msg = 'user invalid.'
|
||||||
return api_error(status.HTTP_400_BAD_REQUEST, error_msg)
|
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 api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg)
|
||||||
|
|
||||||
return Response({'success': True})
|
return Response({'success': True})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user