summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/attributes.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-04-02 04:13:03 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-04-02 04:13:03 +0000
commitb7ee8758e847a74e0b090239b2a2ab9798b5b7be (patch)
treed453e99c9cd8af0e5e79cf93a35f7bdccccc512e /lib/sqlalchemy/attributes.py
parent225b9ec1385a80170ddf27e7c2b62e76ee680590 (diff)
downloadsqlalchemy-b7ee8758e847a74e0b090239b2a2ab9798b5b7be.tar.gz
fixed reset_history method when applied to an attribute that had an attribute-level TriggeredAttribute set on it, added unit test.
Diffstat (limited to 'lib/sqlalchemy/attributes.py')
-rw-r--r--lib/sqlalchemy/attributes.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/attributes.py b/lib/sqlalchemy/attributes.py
index 0e944f6c2..2cac56619 100644
--- a/lib/sqlalchemy/attributes.py
+++ b/lib/sqlalchemy/attributes.py
@@ -200,6 +200,9 @@ class TriggeredAttribute(ManagedAttribute):
self.uselist = uselist
self.kwargs = kwargs
+ def clear(self):
+ self.plain_init(self.manager.attribute_history(self.obj))
+
def plain_init(self, attrhist):
if not self.uselist:
p = ScalarAttribute(self.obj, self.key, **self.kwargs)