mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 20:48:58 +08:00
fix: error in migrate_annotation_vector_database when exec vdb-migrate (#15937)
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
parent
2524f16525
commit
e91531fc23
@ -160,11 +160,17 @@ def migrate_annotation_vector_database():
|
||||
while True:
|
||||
try:
|
||||
# get apps info
|
||||
per_page = 50
|
||||
apps = (
|
||||
App.query.filter(App.status == "normal")
|
||||
db.session.query(App)
|
||||
.filter(App.status == "normal")
|
||||
.order_by(App.created_at.desc())
|
||||
.paginate(page=page, per_page=50)
|
||||
.limit(per_page)
|
||||
.offset((page - 1) * per_page)
|
||||
.all()
|
||||
)
|
||||
if not apps:
|
||||
break
|
||||
except NotFound:
|
||||
break
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user