def getBaseEntity(entity):
    """
    Remove extra information from an entity dict
    keeping only type and id
    """
    if entity is None:
        return entity
    return dict([(k, v) for k, v in entity.items() if k in ['id', 'type']])