mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-13 15:05:30 +00:00
return 404 when can not get progress
This commit is contained in:
parent
6a688db352
commit
0726bae454
@ -13,6 +13,7 @@ from seaserv import seafile_api
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class QueryZipProgressView(APIView):
|
||||
|
||||
throttle_classes = (UserRateThrottle, )
|
||||
@ -35,4 +36,8 @@ class QueryZipProgressView(APIView):
|
||||
error_msg = 'Internal Server Error'
|
||||
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg)
|
||||
|
||||
if not progress:
|
||||
error_msg = 'progress not found.'
|
||||
return api_error(status.HTTP_404_NOT_FOUND, error_msg)
|
||||
|
||||
return Response(json.loads(progress))
|
||||
|
Loading…
Reference in New Issue
Block a user