Skip to content

Commit

Permalink
Make The New Instance Model Fields Available To InstanceHistory Objects
Browse files Browse the repository at this point in the history
  • Loading branch information
moshthepitt authored and ukanga committed Aug 25, 2017
1 parent 42c0524 commit 8598f04
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions onadata/apps/logger/models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,18 @@ def osm_data(self):
def deleted_at(self):
return None

@property
def total_media(self):
return self.xform_instance.total_media

@property
def media_count(self):
return self.xform_instance.media_count

@property
def media_all_received(self):
return self.xform_instance.media_all_received

def _set_parser(self):
if not hasattr(self, "_parser"):
self._parser = XFormInstanceParser(
Expand Down

0 comments on commit 8598f04

Please sign in to comment.