'For sponsors, update wrapped links to include their campaigns.'

def listing(self):

    pane = super(self.__class__, self).listing()
    if c.user_is_sponsor:
        link_ids = {item._id for item in pane.things}
        campaigns = PromoCampaign._by_link(link_ids)
        campaigns_by_link = defaultdict(list)
        for camp in campaigns:
            campaigns_by_link[camp.link_id].append(camp)
        for item in pane.things:
            campaigns = campaigns_by_link[item._id]
            item.campaigns = RenderableCampaign.from_campaigns(item, campaigns, full_details=False)
            item.cachable = False
            item.show_campaign_summary = True
    return pane
