Mercurial > p > roundup > code
diff roundup/cgi/KeywordsExpr.py @ 6046:3b0f423ec980
flake8 whitepace fixes.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 11 Jan 2020 16:34:19 -0500 |
| parents | 7d276bb8b46d |
| children | 99d344aa825d |
line wrap: on
line diff
--- a/roundup/cgi/KeywordsExpr.py Tue Jan 07 21:50:57 2020 -0500 +++ b/roundup/cgi/KeywordsExpr.py Sat Jan 11 16:34:19 2020 -0500 @@ -241,6 +241,7 @@ </script> ''' + def list_nodes(request): prop = request.form.getfirst("property") cls = request.client.db.getclass(prop) @@ -255,15 +256,16 @@ items.sort(key=lambda x: int(x[0])) return items + def items_to_keywords(items): return ',\n '.join(['["%s", "%s"]' % x for x in items]) - + def render_keywords_expression_editor(request): prop = request.form.getfirst("property") window_content = WINDOW_CONTENT % { - 'prop' : prop, + 'prop': prop, 'keywords': items_to_keywords(list_nodes(request)), 'original': '', 'nonce': request.client.client_nonce
