添加注册登录功能

This commit is contained in:
2025-08-29 00:34:40 +08:00
parent 09065f2ce7
commit 2fe3474d9e
3060 changed files with 29217 additions and 87137 deletions

View File

@@ -445,10 +445,23 @@ class ORMDMLState(AbstractORMCompileState):
)
@classmethod
def _get_multi_crud_kv_pairs(cls, statement, kv_iterator):
plugin_subject = statement._propagate_attrs["plugin_subject"]
def _get_dml_plugin_subject(cls, statement):
plugin_subject = statement.table._propagate_attrs.get("plugin_subject")
if not plugin_subject or not plugin_subject.mapper:
if (
not plugin_subject
or not plugin_subject.mapper
or plugin_subject
is not statement._propagate_attrs["plugin_subject"]
):
return None
return plugin_subject
@classmethod
def _get_multi_crud_kv_pairs(cls, statement, kv_iterator):
plugin_subject = cls._get_dml_plugin_subject(statement)
if not plugin_subject:
return UpdateDMLState._get_multi_crud_kv_pairs(
statement, kv_iterator
)
@@ -468,13 +481,12 @@ class ORMDMLState(AbstractORMCompileState):
needs_to_be_cacheable
), "no test coverage for needs_to_be_cacheable=False"
plugin_subject = statement._propagate_attrs["plugin_subject"]
plugin_subject = cls._get_dml_plugin_subject(statement)
if not plugin_subject or not plugin_subject.mapper:
if not plugin_subject:
return UpdateDMLState._get_crud_kv_pairs(
statement, kv_iterator, needs_to_be_cacheable
)
return list(
cls._get_orm_crud_kv_pairs(
plugin_subject.mapper,