Skip to content

Commit

Permalink
feat: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
YangGuoXuan-0503 committed Nov 22, 2023
1 parent 334f747 commit 6bd9b73
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions seahub/api2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3379,16 +3379,14 @@ 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', '')
path = next_file_history.get('path', '')
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(
Expand Down
2 changes: 0 additions & 2 deletions seahub/seadoc/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6bd9b73

Please sign in to comment.