fix: 第一次部署报错

This commit is contained in:
shaohuzhang1 2024-03-15 17:28:59 +08:00
parent e05eca14cf
commit 7d76061029

View File

@ -7,11 +7,6 @@ import uuid
from embedding.models import SourceType
def delete_problem_embedding(apps, schema_editor):
Embedding = apps.get_model('embedding', 'Embedding')
Embedding.objects.filter(source_type=SourceType.PROBLEM).delete()
class Migration(migrations.Migration):
dependencies = [
('dataset', '0004_remove_paragraph_hit_num_remove_paragraph_star_num_and_more'),
@ -55,5 +50,4 @@ class Migration(migrations.Migration):
'db_table': 'problem_paragraph_mapping',
},
),
migrations.RunPython(delete_problem_embedding)
]