Skip to content

Commit

Permalink
bugfix: migrate subject system group without subject
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu327 committed Sep 13, 2023
1 parent c6c272e commit 445d647
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/support-files/migrate_subject_system_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def db_list_subject_pk(
sql = "SELECT MAX(pk) FROM subject WHERE type IN %s;"
cursor.execute(sql, [tuple(types)])
max_pk = cursor.fetchone()[0] # type: ignore
if not max_pk:
return

# 每次查询1000条
sql = "SELECT pk FROM subject WHERE type IN %s AND pk >= %s AND pk < %s;"
Expand Down

0 comments on commit 445d647

Please sign in to comment.