'insert new portal menu item if route is not set, or role is different'

def add_item(self, item):

    exists = [d for d in self.get(u'menu', []) if (d.get(u'route') == item.get(u'route'))]
    if (exists and item.get(u'role')):
        if (exists[0].role != item.get(u'role')):
            exists[0].role = item.get(u'role')
            return True
    elif (not exists):
        item[u'enabled'] = 1
        self.append(u'menu', item)
        return True
