summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/attributes.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/attributes.py')
-rw-r--r--lib/sqlalchemy/attributes.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/attributes.py b/lib/sqlalchemy/attributes.py
index f3fd1b558..aa768532d 100644
--- a/lib/sqlalchemy/attributes.py
+++ b/lib/sqlalchemy/attributes.py
@@ -202,6 +202,8 @@ class AttributeManager(object):
return self.get_history(obj, key, **kwargs)
def set_attribute(self, obj, key, value, **kwargs):
+ if key == 'parent' and value is not None and value.__class__.__name__ != 'Comment':
+ raise "wha?"
self.get_history(obj, key, **kwargs).setattr(value)
self.value_changed(obj, key, value)