Skip to content
Permalink
170b47692b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
18 lines (13 sloc) 625 Bytes
from flask import flash, url_for
from conekt.extensions import admin_required
from werkzeug.utils import redirect
from conekt.controllers.admin.controls import admin_controls
from conekt.models.expression.networks import ExpressionNetworkMethod
@admin_controls.route('/calculate_ecc/<int:gf_method_id>')
@admin_required
def calculate_ecc(gf_method_id):
networks = ExpressionNetworkMethod.query.all()
network_ids = [n.id for n in networks]
ExpressionNetworkMethod.calculate_ecc(network_ids, gf_method_id)
flash('Successfully calculated ECC', 'success')
return redirect(url_for('admin.controls.index'))