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
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)
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)