From 2118af0173e18c6ae39ff376d61f83e15b87f900 Mon Sep 17 00:00:00 2001 From: Daniel Roberts Date: Sun, 30 Mar 2014 16:01:56 -0400 Subject: [PATCH] add build_id to metadata --- couchforms/util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/couchforms/util.py b/couchforms/util.py index ae60367..4d510dc 100644 --- a/couchforms/util.py +++ b/couchforms/util.py @@ -334,8 +334,8 @@ class SubmissionPost(object): failed_auth_response = HttpResponseForbidden('Bad auth') - def __init__(self, instance=None, attachments=None, - auth_context=None, domain=None, app_id=None, path=None, + def __init__(self, instance=None, attachments=None, auth_context=None, + domain=None, app_id=None, build_id=None, path=None, location=None, submit_ip=None, openrosa_headers=None, last_sync_token=None, received_on=None, date_header=None): assert domain, domain @@ -344,6 +344,7 @@ def __init__(self, instance=None, attachments=None, # get_location has good default self.domain = domain self.app_id = app_id + self.build_id = build_id self.location = location or couchforms.get_location() self.received_on = received_on self.date_header = date_header @@ -374,6 +375,7 @@ def _attach_shared_props(self, doc): doc['domain'] = self.domain doc['app_id'] = self.app_id + doc['build_id'] = self.build_id doc['#export_tag'] = ["domain", "xmlns"] return doc