fix: fix orm_exc.DetachedInstanceError#34904
Merged
asukaminato0721 merged 2 commits intolanggenius:mainfrom Apr 10, 2026
Merged
fix: fix orm_exc.DetachedInstanceError#34904asukaminato0721 merged 2 commits intolanggenius:mainfrom
asukaminato0721 merged 2 commits intolanggenius:mainfrom
Conversation
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-10 06:30:47.145261242 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-10 06:30:37.112245569 +0000
@@ -1,7 +1,7 @@
ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
--> controllers/console/app/app.py:561:13
ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
- --> controllers/console/auth/email_register.py:78:108
+ --> controllers/console/auth/email_register.py:76:108
ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
--> controllers/console/init_validate.py:31:2
ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
@@ -316,7 +316,7 @@
ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=int | str | Unknown, port=int | str | Unknown, password=int | str | Unknown | None, db=int, ssl=bool, ssl_ca_certs=str | None, ssl_cert_reqs=Any | None, ssl_certfile=Any | None, ssl_keyfile=Any | None, socket_timeout=Literal[5], socket_connect_timeout=Literal[5], health_check_interval=Literal[30]) [no-matching-overload]
--> schedule/queue_monitor_task.py:14:21
ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]
- --> services/account_service.py:1153:13
+ --> services/account_service.py:1154:13
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
--> services/audio_service.py:144:56
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
@@ -577,10 +577,16 @@
--> tests/test_containers_integration_tests/controllers/console/app/test_app_apis.py:600:51
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
+ERROR Unexpected keyword argument `session` in function `services.account_service.AccountService.get_account_by_email_with_case_fallback` [unexpected-keyword]
+ --> tests/test_containers_integration_tests/controllers/console/auth/test_email_register.py:161:86
+ERROR Unexpected keyword argument `session` in function `services.account_service.AccountService.get_account_by_email_with_case_fallback` [unexpected-keyword]
+ --> tests/test_containers_integration_tests/controllers/console/auth/test_forgot_password.py:164:87
ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
--> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:196:9
ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
--> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:197:9
+ERROR Unexpected keyword argument `session` in function `services.account_service.AccountService.get_account_by_email_with_case_fallback` [unexpected-keyword]
+ --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:440:90
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/controllers/console/helpers.py:40:48
ERROR `SimpleNamespace` is not assignable to attribute `mcp_ns` with type `Namespace` [bad-assignment]
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-10 06:32:42.996955079 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-10 06:32:33.405965422 +0000
@@ -1,7 +1,7 @@
ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
--> controllers/console/app/app.py:561:13
ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
- --> controllers/console/auth/email_register.py:78:108
+ --> controllers/console/auth/email_register.py:75:108
ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
--> controllers/console/init_validate.py:31:2
ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
@@ -316,7 +316,7 @@
ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=int | str | Unknown, port=int | str | Unknown, password=int | str | Unknown | None, db=int, ssl=bool, ssl_ca_certs=str | None, ssl_cert_reqs=Any | None, ssl_certfile=Any | None, ssl_keyfile=Any | None, socket_timeout=Literal[5], socket_connect_timeout=Literal[5], health_check_interval=Literal[30]) [no-matching-overload]
--> schedule/queue_monitor_task.py:14:21
ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]
- --> services/account_service.py:1153:13
+ --> services/account_service.py:1154:13
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
--> services/audio_service.py:144:56
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
@@ -577,10 +577,16 @@
--> tests/test_containers_integration_tests/controllers/console/app/test_app_apis.py:600:51
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
+ERROR Unexpected keyword argument `session` in function `services.account_service.AccountService.get_account_by_email_with_case_fallback` [unexpected-keyword]
+ --> tests/test_containers_integration_tests/controllers/console/auth/test_email_register.py:161:86
+ERROR Unexpected keyword argument `session` in function `services.account_service.AccountService.get_account_by_email_with_case_fallback` [unexpected-keyword]
+ --> tests/test_containers_integration_tests/controllers/console/auth/test_forgot_password.py:164:87
ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
--> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:196:9
ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
--> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:197:9
+ERROR Unexpected keyword argument `session` in function `services.account_service.AccountService.get_account_by_email_with_case_fallback` [unexpected-keyword]
+ --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:440:90
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/controllers/console/helpers.py:40:48
ERROR `SimpleNamespace` is not assignable to attribute `mcp_ns` with type `Namespace` [bad-assignment]
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-10 06:50:30.523858547 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-10 06:50:20.561814991 +0000
@@ -1,7 +1,7 @@
ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
--> controllers/console/app/app.py:561:13
ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
- --> controllers/console/auth/email_register.py:78:108
+ --> controllers/console/auth/email_register.py:76:108
ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
--> controllers/console/init_validate.py:31:2
ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
@@ -316,7 +316,7 @@
ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=int | str | Unknown, port=int | str | Unknown, password=int | str | Unknown | None, db=int, ssl=bool, ssl_ca_certs=str | None, ssl_cert_reqs=Any | None, ssl_certfile=Any | None, ssl_keyfile=Any | None, socket_timeout=Literal[5], socket_connect_timeout=Literal[5], health_check_interval=Literal[30]) [no-matching-overload]
--> schedule/queue_monitor_task.py:14:21
ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]
- --> services/account_service.py:1153:13
+ --> services/account_service.py:1154:13
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
--> services/audio_service.py:144:56
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
@@ -1182,9 +1182,9 @@
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:142:20
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:346:20
+ --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:345:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:717:20
+ --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:715:20
ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_webhook_service.py:288:88
ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-10 06:52:17.249908860 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-10 06:52:09.097026953 +0000
@@ -1,7 +1,7 @@
ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
--> controllers/console/app/app.py:561:13
ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
- --> controllers/console/auth/email_register.py:78:108
+ --> controllers/console/auth/email_register.py:75:108
ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
--> controllers/console/init_validate.py:31:2
ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
@@ -316,7 +316,7 @@
ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=int | str | Unknown, port=int | str | Unknown, password=int | str | Unknown | None, db=int, ssl=bool, ssl_ca_certs=str | None, ssl_cert_reqs=Any | None, ssl_certfile=Any | None, ssl_keyfile=Any | None, socket_timeout=Literal[5], socket_connect_timeout=Literal[5], health_check_interval=Literal[30]) [no-matching-overload]
--> schedule/queue_monitor_task.py:14:21
ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]
- --> services/account_service.py:1153:13
+ --> services/account_service.py:1154:13
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
--> services/audio_service.py:144:56
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
@@ -1182,9 +1182,9 @@
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:142:20
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:346:20
+ --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:345:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:717:20
+ --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:715:20
ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_webhook_service.py:288:88
ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-10 07:03:59.048554243 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-10 07:03:50.675579151 +0000
@@ -1,7 +1,7 @@
ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
--> controllers/console/app/app.py:561:13
ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
- --> controllers/console/auth/email_register.py:78:108
+ --> controllers/console/auth/email_register.py:76:108
ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
--> controllers/console/init_validate.py:31:2
ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
@@ -316,7 +316,7 @@
ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=int | str | Unknown, port=int | str | Unknown, password=int | str | Unknown | None, db=int, ssl=bool, ssl_ca_certs=str | None, ssl_cert_reqs=Any | None, ssl_certfile=Any | None, ssl_keyfile=Any | None, socket_timeout=Literal[5], socket_connect_timeout=Literal[5], health_check_interval=Literal[30]) [no-matching-overload]
--> schedule/queue_monitor_task.py:14:21
ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]
- --> services/account_service.py:1153:13
+ --> services/account_service.py:1154:13
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
--> services/audio_service.py:144:56
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
@@ -1182,9 +1182,9 @@
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:142:20
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:346:20
+ --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:345:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:717:20
+ --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:715:20
ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_webhook_service.py:288:88
ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-10 07:06:04.726860658 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-10 07:05:55.282623930 +0000
@@ -1,7 +1,7 @@
ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
--> controllers/console/app/app.py:561:13
ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
- --> controllers/console/auth/email_register.py:78:108
+ --> controllers/console/auth/email_register.py:75:108
ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
--> controllers/console/init_validate.py:31:2
ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
@@ -316,7 +316,7 @@
ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=int | str | Unknown, port=int | str | Unknown, password=int | str | Unknown | None, db=int, ssl=bool, ssl_ca_certs=str | None, ssl_cert_reqs=Any | None, ssl_certfile=Any | None, ssl_keyfile=Any | None, socket_timeout=Literal[5], socket_connect_timeout=Literal[5], health_check_interval=Literal[30]) [no-matching-overload]
--> schedule/queue_monitor_task.py:14:21
ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]
- --> services/account_service.py:1153:13
+ --> services/account_service.py:1154:13
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
--> services/audio_service.py:144:56
ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
@@ -1182,9 +1182,9 @@
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:142:20
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:346:20
+ --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:345:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
- --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:717:20
+ --> tests/test_containers_integration_tests/services/test_webapp_auth_service.py:715:20
ERROR Argument `dict[str, dict[str, list[dict[str, bool | str]] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_webhook_service.py:288:88
ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.extract_and_validate_webhook_data` [bad-argument-type]
|
asukaminato0721
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Fixes #<issue number>.Summary
fix #34902
Screenshots
Checklist
make lintandmake type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods