def to_dict_old(inst):
    """
    Converts a SQLAlchemy model instance in a dictionary
    """
    convert = dict()
    my_dict = dict()
    for column in inst.__class__.__table__.columns:
        value = getattr(inst, column.name)
        if column.type in convert.keys():
            try:
                my_dict[column.name] = convert[column.type](value)
            except:
                my_dict[column.name] = 'Error:  Failed to covert using ', str(
                    convert[column.type])
        else:
            my_dict[column.name] = value
    return my_dict
