Resolved a bug when editing a timeline.
authorLennard de Rijk <ljvderijk@gmail.com>
Thu, 08 Jan 2009 21:44:03 +0000
changeset 793 4bde741aa2bb
parent 792 3cc6bea5c632
child 794 19c24508c398
Resolved a bug when editing a timeline. Scope path is now set correctly when editing a timeline. Patch by: Lennard de Rijk
app/soc/views/models/timeline.py
--- a/app/soc/views/models/timeline.py	Thu Jan 08 21:24:36 2009 +0000
+++ b/app/soc/views/models/timeline.py	Thu Jan 08 21:44:03 2009 +0000
@@ -81,6 +81,13 @@
 
     return super(View, self).edit(request, access_type, page_name=page_name,
                                   params=params, seed=seed, **kwargs)
+  
+  def _editPost(self, request, entity, fields):
+    """See base.View._editPost().
+    """
+    
+    # a timeline can only be edited, so set the scope path using entity
+    fields['scope_path'] = entity.scope_path
 
 
 view = View()