Mercurial > farol
changeset 62:ce49bd1512dd
Make pyflafes a happier
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Wed, 08 Oct 2014 12:55:40 +0200 |
parents | 55b72057b066 |
children | b4fb652484b4 |
files | farol/controller.py farol/document.py farol/main.py farol/producttree.py farol/session.py farol/vulnerability.py |
diffstat | 6 files changed, 7 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/farol/controller.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/controller.py Wed Oct 08 12:55:40 2014 +0200 @@ -29,7 +29,7 @@ from flask import request -from farolluz.cvrf import CVRFNote, CVRFAcknowledgment +from farolluz.cvrf import CVRFNote, CVRFReference, CVRFAcknowledgment def update_note_from_request(note): note._type = request.form['type']
--- a/farol/document.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/document.py Wed Oct 08 12:55:40 2014 +0200 @@ -26,8 +26,8 @@ url_for) from farolluz.parsers.cvrf import parseDate, parseVersion -from farolluz.cvrf import (CVRFNote, CVRFReference, CVRFAcknowledgment, - CVRFPublisher, CVRFTracking, CVRFTrackingID, CVRFGenerator, CVRFRevision, +from farolluz.cvrf import (CVRFNote, CVRFReference, CVRFPublisher, + CVRFTracking, CVRFTrackingID, CVRFGenerator, CVRFRevision, CVRFAggregateSeverity) from farolluz.renderer import utcnow
--- a/farol/main.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/main.py Wed Oct 08 12:55:40 2014 +0200 @@ -141,7 +141,6 @@ def new(): if request.method != 'POST': current_id = None - cvrf = get_current() if has_current(): current_id = get_current().getDocId() return render_template('new.j2', has_document=has_current(), now=utcnow(), current_id=current_id)
--- a/farol/producttree.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/producttree.py Wed Oct 08 12:55:40 2014 +0200 @@ -181,7 +181,7 @@ if request.form['parent_branch'] and request.form['parent_relationship']: flash('Cannot set a parent branch and parent relationship', 'danger') - return redirect(url_for('.edit_product', productid=productid)) + return redirect(url_for('.add_product')) parent = ptree if request.form['parent_branch']:
--- a/farol/session.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/session.py Wed Oct 08 12:55:40 2014 +0200 @@ -29,7 +29,7 @@ from functools import wraps import uuid -from flask import session, flash, redirect, url_for +from flask import session, redirect, url_for CVRFs = {}
--- a/farol/vulnerability.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/vulnerability.py Wed Oct 08 12:55:40 2014 +0200 @@ -27,8 +27,8 @@ from farolluz.parsers.cvrf import parseDate from farolluz.cvrf import (CVRFVulnerability, CVRFVulnerabilityID, CVRFNote, - CVRFReference, CVRFAcknowledgment, CVRFCWE, CVRFInvolvement, CVRFThreat, - CVRFProductStatus, CVRFCVSSSet, CVRFRemediation) + CVRFReference, CVRFCWE, CVRFInvolvement, CVRFThreat, CVRFProductStatus, + CVRFCVSSSet, CVRFRemediation) from farolluz.renderer import utcnow from .controller import (update_note_from_request, create_note_from_request, @@ -252,7 +252,6 @@ @vulnerability.route('/<int:ordinal>/threat/add', methods=['GET', 'POST']) @document_required def add_threat(ordinal): - cvrf = get_current() if request.method != 'POST': return render_template('vulnerability/edit_threat.j2', ordinal=ordinal, @@ -276,7 +275,6 @@ threat = get_vuln(ordinal)._threats[index] except IndexError: abort(404) - cvrf = get_current() if request.method != 'POST': return render_template('vulnerability/edit_threat.j2', ordinal=ordinal, index=index,