equal
deleted
inserted
replaced
87 |
87 |
88 def _editPost(self, request, entity, fields): |
88 def _editPost(self, request, entity, fields): |
89 """See base._editPost(). |
89 """See base._editPost(). |
90 """ |
90 """ |
91 |
91 |
92 fields['timeline'] = self._createTimelineForType(fields['workflow']) |
92 if not entity: |
|
93 # there is no existing entity so create a new timeline |
|
94 fields['timeline'] = self._createTimelineForType(fields['workflow']) |
|
95 else: |
|
96 # use the timeline from the entity |
|
97 fields['timeline'] = entity.timeline |
93 |
98 |
94 def _createTimelineForType(self, type): |
99 def _createTimelineForType(self, type): |
95 """Creates and stores a timeline model for the given type of program |
100 """Creates and stores a timeline model for the given type of program |
96 """ |
101 """ |
97 |
102 |