Esempio n. 1
0
def _get_new_form_json(xml, xform_id):
    form_json = convert_xform_to_json(xml)
    with force_phone_timezones_should_be_processed():
        adjust_datetimes(form_json)
    # this is actually in-place because of how jsonobject works
    scrub_meta(XFormInstance.wrap({'form': form_json, '_id': xform_id}))
    return form_json
Esempio n. 2
0
def _get_new_form_json(xml, xform_id):
    form_json = convert_xform_to_json(xml)
    with force_phone_timezones_should_be_processed():
        adjust_datetimes(form_json)
    # this is actually in-place because of how jsonobject works
    scrub_meta(XFormInstance.wrap({'form': form_json, '_id': xform_id}))
    return form_json
Esempio n. 3
0
 def _post_process_form(self, xform):
     self._set_submission_properties(xform)
     found_old = scrub_meta(xform)
     legacy_notification_assert(not found_old, 'Form with old metadata submitted', xform.form_id)
Esempio n. 4
0
 def _post_process_form(self, xform):
     self._set_submission_properties(xform)
     if xform.is_submission_error_log:
         found_old = scrub_meta(xform)
         legacy_notification_assert(not found_old, 'Form with old metadata submitted', xform.form_id)