diff --git a/seahub/api2/views.py b/seahub/api2/views.py index ab50e38e621..0cf6f23ab8a 100644 --- a/seahub/api2/views.py +++ b/seahub/api2/views.py @@ -3379,8 +3379,6 @@ def get(self, request, repo_id, current_revision_id, format=None): try: next_file_history = get_next_file_history(repo_id, path, current_revision_id) except Exception as e: - print('**********') - print(e) next_file_history = {} commit_id = next_file_history.get('commit_id', '') @@ -3388,7 +3386,7 @@ def get(self, request, repo_id, current_revision_id, format=None): file_name = os.path.basename(path) if not commit_id: - return Response('') + return api_error(status.HTTP_404_NOT_FOUND, 'Revision commit_id not found.') try: obj_id = seafserv_threaded_rpc.get_file_id_by_commit_and_path( diff --git a/seahub/seadoc/apis.py b/seahub/seadoc/apis.py index f2c88b8c73e..d33c28ca142 100644 --- a/seahub/seadoc/apis.py +++ b/seahub/seadoc/apis.py @@ -754,8 +754,6 @@ def get(self, request, file_uuid): error_msg = 'op_date invalid.' return api_error(status.HTTP_400_BAD_REQUEST, error_msg) - to_tz = request.GET.get('to_tz', TO_TZ) - try: file_revisions = get_file_daily_history_detail(repo_id, path, start_time, end_time, to_tz) except Exception as e: