Skip to content

Commit

Permalink
the '$prev' value is not used yet and doesn't help to
Browse files Browse the repository at this point in the history
keep around when the survey rows are already stored in an
array.
  • Loading branch information
dorey committed Oct 27, 2016
1 parent 6fe64f5 commit 4a190c8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kpi/models/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ def _link_list_items(self, content):
for i in range(1, len(arr)):
arr[i]['$prev'] = arr[i-1]['$kuid']

def _unlink_list_items(self, content):
arr = content['survey']
for row in arr:
if '$kuid' in row:
del row['$kuid']


def _remove_empty_expressions(self, content):
remove_empty_expressions_in_place(content)

Expand Down Expand Up @@ -398,7 +405,7 @@ def adjust_content_on_save(self):
self._strip_empty_rows(self.content)
self._assign_kuids(self.content)
self._autoname(self.content)
self._link_list_items(self.content)
self._unlink_list_items(self.content)
self._remove_empty_expressions(self.content)

settings = self.content['settings']
Expand Down

0 comments on commit 4a190c8

Please sign in to comment.