This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# orm/sync.py
|
||||
# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
|
||||
# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors
|
||||
# <see AUTHORS file>
|
||||
#
|
||||
# This module is part of SQLAlchemy and is released under
|
||||
@@ -86,9 +86,8 @@ def clear(dest, dest_mapper, synchronize_pairs):
|
||||
not in orm_util._none_set
|
||||
):
|
||||
raise AssertionError(
|
||||
f"Dependency rule on column '{l}' "
|
||||
"tried to blank-out primary key "
|
||||
f"column '{r}' on instance '{orm_util.state_str(dest)}'"
|
||||
"Dependency rule tried to blank-out primary key "
|
||||
"column '%s' on instance '%s'" % (r, orm_util.state_str(dest))
|
||||
)
|
||||
try:
|
||||
dest_mapper._set_state_attr_by_column(dest, dest.dict, r, None)
|
||||
|
||||
Reference in New Issue
Block a user