mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-18 00:09:55 +08:00
Fix: Deleting a cached property will calculate it
This commit is contained in:
@@ -14,7 +14,7 @@ def del_cached_property(obj, name):
|
|||||||
obj:
|
obj:
|
||||||
name (str):
|
name (str):
|
||||||
"""
|
"""
|
||||||
if hasattr(obj, name):
|
if 'attr' in obj.__dict__:
|
||||||
del obj.__dict__[name]
|
del obj.__dict__[name]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ def del_cached_property(obj, name):
|
|||||||
obj:
|
obj:
|
||||||
name (str):
|
name (str):
|
||||||
"""
|
"""
|
||||||
if hasattr(obj, name):
|
if 'attr' in obj.__dict__:
|
||||||
del obj.__dict__[name]
|
del obj.__dict__[name]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user