Make sure Typeclass.at_init() is always called on cache initialization for any typeclass. Resolve #2641
This commit is contained in:
parent
a427594f25
commit
5e2372f79d
6 changed files with 27 additions and 8 deletions
|
|
@ -313,6 +313,7 @@ class SharedMemoryModel(Model, metaclass=SharedMemoryModelBase):
|
|||
"""
|
||||
pk = instance._get_pk_val()
|
||||
if pk is not None:
|
||||
new = new or pk not in cls.__dbclass__.__instance_cache__
|
||||
cls.__dbclass__.__instance_cache__[pk] = instance
|
||||
if new:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue