[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot] 2025-12-12 01:43:12 +00:00 committed by GitHub
parent 59e94c520d
commit e321f7c855
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 9 deletions

View File

@ -394,9 +394,7 @@ class DifyAPISQLAlchemyWorkflowRunRepository(APIWorkflowRunRepository):
)
node_executions_deleted = node_executions_result.rowcount or 0
app_logs_result = session.execute(
delete(WorkflowAppLog).where(WorkflowAppLog.workflow_run_id.in_(run_ids))
)
app_logs_result = session.execute(delete(WorkflowAppLog).where(WorkflowAppLog.workflow_run_id.in_(run_ids)))
app_logs_deleted = app_logs_result.rowcount or 0
pause_ids = session.scalars(

View File

@ -98,7 +98,5 @@ class SQLAlchemyWorkflowTriggerLogRepository(WorkflowTriggerLogRepository):
if not run_ids:
return 0
result = self.session.execute(
delete(WorkflowTriggerLog).where(WorkflowTriggerLog.workflow_run_id.in_(run_ids))
)
result = self.session.execute(delete(WorkflowTriggerLog).where(WorkflowTriggerLog.workflow_run_id.in_(run_ids)))
return result.rowcount or 0

View File

@ -219,9 +219,7 @@ class TestCreateWorkflowPause(TestDifyAPISQLAlchemyWorkflowRunRepository):
class TestDeleteRunsWithRelated(TestDifyAPISQLAlchemyWorkflowRunRepository):
def test_uses_trigger_log_repository(
self, repository: DifyAPISQLAlchemyWorkflowRunRepository, mock_session: Mock
):
def test_uses_trigger_log_repository(self, repository: DifyAPISQLAlchemyWorkflowRunRepository, mock_session: Mock):
node_ids_result = Mock()
node_ids_result.all.return_value = []
pause_ids_result = Mock()