Skip to content

Commit

Permalink
double save to preserve original asset content
Browse files Browse the repository at this point in the history
  • Loading branch information
dorey committed Feb 24, 2017
1 parent 1cc4e58 commit 55578ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kpi/management/commands/sync_kobocat_xforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,10 @@ def handle(self, *args, **options):
continue

if content_changed or metadata_changed:
# preserve the original "asset.content"
asset.save(adjust_content=False)
# save a new version with standardized content
asset.save()
if content_changed:
asset._mark_latest_version_as_deployed()
self._print_tabular(
Expand Down

0 comments on commit 55578ae

Please sign in to comment.