Skip to content

Commit

Permalink
feat: optimzie code
Browse files Browse the repository at this point in the history
  • Loading branch information
杨国璇 authored and 杨国璇 committed Dec 18, 2024
1 parent 7c0c60b commit 41284bc
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions seahub/repo_metadata/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1790,9 +1790,6 @@ def post(self, request, repo_id):
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg)

row_ids = resp.get('row_ids', [])
if not row_ids:
return Response({ 'tags': tags })

row_ids_str = ', '.join([f'"{id}"' for id in row_ids])
sql = f'SELECT * FROM {TAGS_TABLE.name} WHERE `{TAGS_TABLE.columns.id.name}` in ({row_ids_str})'
try:
Expand Down

0 comments on commit 41284bc

Please sign in to comment.