def get_object_adjacency(cur,obj):
    """
    Returns the adjacency of the object number

    Parameters
    ----------
    cur : MySQLdb cursor
    obj : int
       Object number

    """
    sql = ("select pre from adjacency2 "
           "where postObj = %s "
           "union "
           "select post from adjacency2 "
           "where preObj = %s "
           %(obj,obj)
           )
    try:
        cur.execute(sql)
        return [a[0] for a in cur.fetchall()]
    except:
        return None