def delete_technology_group(technology, group_id): tech = get_technology_by_group(technology, group_id) db_session.delete(tech) db_session.commit() return tech
def add_technology_group(technology, group_id): tech = Technology(technology['technology'], technology['category'], \ technology['status'], group_id, technology['description']) db_session.add(tech) db_session.commit() return tech
def update_technology_group(technology, group_id): tech = get_technology_by_group(technology['technology'], group_id) tech.category = technology['category'] tech.status = technology['status'] tech.description = technology['description'] db_session.commit() return tech
def delete_groups(group_name): group = Groups.query.filter_by(group=group_name).first() db_session.delete(group) db_session.commit() return group
def add_groups(groups): for group in groups: group_name = Groups(group.lower()) db_session.add(group_name) db_session.commit() return groups