Update ast-grep pattern for session.query (#24828)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Asuka Minato
2025-08-31 18:03:51 +09:00
committed by GitHub
parent 529791ce62
commit 24e2b72b71
11 changed files with 30 additions and 29 deletions

View File

@@ -674,7 +674,7 @@ class TestAnnotationService:
history = (
db.session.query(AppAnnotationHitHistory)
.filter(
.where(
AppAnnotationHitHistory.annotation_id == annotation.id, AppAnnotationHitHistory.message_id == message_id
)
.first()

View File

@@ -166,7 +166,7 @@ class TestAppDslService:
assert result.imported_dsl_version == ""
# Verify no app was created in database
apps_count = db_session_with_containers.query(App).filter(App.tenant_id == account.current_tenant_id).count()
apps_count = db_session_with_containers.query(App).where(App.tenant_id == account.current_tenant_id).count()
assert apps_count == 1 # Only the original test app
def test_import_app_missing_yaml_url(self, db_session_with_containers, mock_external_service_dependencies):
@@ -191,7 +191,7 @@ class TestAppDslService:
assert result.imported_dsl_version == ""
# Verify no app was created in database
apps_count = db_session_with_containers.query(App).filter(App.tenant_id == account.current_tenant_id).count()
apps_count = db_session_with_containers.query(App).where(App.tenant_id == account.current_tenant_id).count()
assert apps_count == 1 # Only the original test app
def test_import_app_invalid_import_mode(self, db_session_with_containers, mock_external_service_dependencies):
@@ -215,7 +215,7 @@ class TestAppDslService:
)
# Verify no app was created in database
apps_count = db_session_with_containers.query(App).filter(App.tenant_id == account.current_tenant_id).count()
apps_count = db_session_with_containers.query(App).where(App.tenant_id == account.current_tenant_id).count()
assert apps_count == 1 # Only the original test app
def test_export_dsl_chat_app_success(self, db_session_with_containers, mock_external_service_dependencies):