def get_campaign_form_name(campaign_name): if campaign_name: return Campaign.query(Campaign.name == campaign_name).get() else: return None
def fetch_campaigns(): return Campaign.query().order(-Campaign.created_on)