def edit_callback(values): from bauble.plugins.plants.species_editor import SpeciesEditor sp = values[0] if isinstance(sp, VernacularName): sp = sp.species e = SpeciesEditor(model=sp) return e.start() != None
def add_species_callback(genera): session = db.Session() genus = session.merge(genera[0]) from bauble.plugins.plants.species_editor import SpeciesEditor e = SpeciesEditor(model=Species(genus=genus)) session.close() return e.start() != None