--- a/app/soc/logic/models/presence.py Sat Feb 21 00:33:59 2009 +0000
+++ b/app/soc/logic/models/presence.py Sat Feb 21 00:43:56 2009 +0000
@@ -50,6 +50,7 @@
entity: Presence (or one of its sub-classes) entity that may or may
not have a ToS Document attached
"""
+
if not entity:
return None
--- a/app/soc/views/models/presence.py Sat Feb 21 00:33:59 2009 +0000
+++ b/app/soc/views/models/presence.py Sat Feb 21 00:43:56 2009 +0000
@@ -144,6 +144,10 @@
if 'home_link_id' not in fields:
return super(View, self)._editPost(request, entity, fields)
+ if not fields['home_link_id'] and entity.home:
+ properties = {'home_for': None}
+ document_logic.logic.updateEntityProperties(entity.home, properties)
+
scope_path = self._logic.getKeyNameFromFields(fields)
key_fields = {
@@ -157,4 +161,8 @@
fields['home'] = home_doc
+ if home_doc:
+ properties = {'home_for': entity}
+ document_logic.logic.updateEntityProperties(home_doc, properties)
+
super(View, self)._editPost(request, entity, fields)