comparison farol/producttree.py @ 83:2ecf13200e87

Fix issue from a previous commit
author Benoît Allard <benoit.allard@greenbone.net>
date Thu, 09 Oct 2014 14:26:33 +0200
parents d6fa288e92a7
children cc836f9e869e
comparison
equal deleted inserted replaced
82:d6fa288e92a7 83:2ecf13200e87
202 flash('Cannot set a parent branch and parent relationship', 'danger') 202 flash('Cannot set a parent branch and parent relationship', 'danger')
203 return redirect(url_for('.add_product')) 203 return redirect(url_for('.add_product'))
204 204
205 parent = ptree 205 parent = ptree
206 if request.form['parent_branch']: 206 if request.form['parent_branch']:
207 try: pbranch = ptree.getBranch([int(p) for p in request.form['parent_branch'].split('/')]) 207 try: parent = ptree.getBranch([int(p) for p in request.form['parent_branch'].split('/')])
208 except (ValueError, IndexError): abort(404) 208 except (ValueError, IndexError): abort(404)
209 elif request.form['parent_relationship']: 209 elif request.form['parent_relationship']:
210 parent = ptree._relationships[int(request.form['parent_relationship'])] 210 parent = ptree._relationships[int(request.form['parent_relationship'])]
211 211
212 product = CVRFFullProductName(request.form['productid'], request.form['name'], parent, request.form['cpe'] or None) 212 product = CVRFFullProductName(request.form['productid'], request.form['name'], parent, request.form['cpe'] or None)

http://farol.wald.intevation.org