(current_schema, original_id, original_rev)
return current_schema
Given a schema object, this function saves the object and ensures that the
        ID remains the save as the previous save if there existed a previous version.
Given a schema object, this function saves the object and ensures that the
        ID remains the save as the previous save if there existed a previous version.
Given a schema object this function saves the object and ensures that the ID remains the save as the previous save if there existed a previous version .
def _save_export_schema(current_schema, original_id, original_rev):
        """
        Given a schema object, this function saves the object and ensures that the
        ID remains the save as the previous save if there existed a previous version.
        """
        if original_id and original_rev:
            current_schema._id = original_id
            current_schema._rev = original_rev

        try:
            current_schema.save()
        except ResourceConflict:
            # It's possible that another process updated the schema before we
            # got to it. If so, we want to overwrite those changes because we
            # have the most recently built schema.
            current_schema._rev = ExportDataSchema.get_db().get_rev(current_schema._id)
            current_schema.save()

        return current_schema
def _save_export_schema ( current_schema , original_id , original_rev ) : if original_id and original_rev : current_schema . _id = original_id current_schema . _rev = original_rev try : current_schema . save ( ) except ResourceConflict : # It's possible that another process updated the schema before we # got to it. If so, we want to overwrite those changes because we # have the most recently built schema. current_schema . _rev = ExportDataSchema . get_db ( ) . get_rev ( current_schema . _id ) current_schema . save ( ) return current_schema