Set empty strings to None where allowed

    This is done on fields with `allow_blank=True` which takes
    an incoming empty string & sets it to None so validations
    are skipped. This is useful on fields that aren't required
    with format validations like URLType, EmailType, etc.

def _from_rest_blank(model, props):
    """ Set empty strings to None where allowed

    This is done on fields with `allow_blank=True` which takes
    an incoming empty string & sets it to None so validations
    are skipped. This is useful on fields that aren't required
    with format validations like URLType, EmailType, etc.
    """

    blank = model.get_fields_by_prop('allow_blank', True)

    for field in blank:
        try:
            if props[field] == '':
                props[field] = None
        except KeyError:
            continue