--- a/app/soc/views/models/program.py Sat Aug 22 03:56:14 2009 +0530
+++ b/app/soc/views/models/program.py Sat Aug 22 03:56:25 2009 +0530
@@ -588,27 +588,11 @@
if not entity:
# there is no existing entity so create a new timeline
- fields['timeline'] = self._createTimelineForType(fields)
+ fields['timeline'] = self._params['logic'].createTimelineForType(fields)
else:
# use the timeline from the entity
fields['timeline'] = entity.timeline
- def _createTimelineForType(self, fields):
- """Creates and stores a timeline model for the given type of program.
- """
-
- workflow = fields['workflow']
-
- timeline_logic = program_logic.logic.TIMELINE_LOGIC[workflow]
-
- properties = timeline_logic.getKeyFieldsFromFields(fields)
- key_name = timeline_logic.getKeyNameFromFields(properties)
-
- properties['scope'] = fields['scope']
-
- timeline = timeline_logic.updateOrCreateFromKeyName(properties, key_name)
- return timeline
-
@decorators.merge_params
def getExtraMenus(self, id, user, params=None):
"""Returns the extra menu's for this view.