Commit d7c46042 authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

sorted mjd

parent c7d17dbf
...@@ -24,6 +24,7 @@ import cherrypy ...@@ -24,6 +24,7 @@ import cherrypy
import auth import auth
from pipelet.web import TreeView from pipelet.web import TreeView
from copy import copy from copy import copy
from operator import itemgetter, attrgetter
class PBView(TreeView): class PBView(TreeView):
...@@ -74,6 +75,7 @@ class PBView(TreeView): ...@@ -74,6 +75,7 @@ class PBView(TreeView):
for s in l: for s in l:
ll += conn.execute('select input,str_input from tasks where seg_id=? and status="done"',(s[0],)).fetchall() ll += conn.execute('select input,str_input from tasks where seg_id=? and status="done"',(s[0],)).fetchall()
conn.close() conn.close()
lst_mjd = [] lst_mjd = []
lst_patch= [] lst_patch= []
lst_dir = [] lst_dir = []
...@@ -85,9 +87,13 @@ class PBView(TreeView): ...@@ -85,9 +87,13 @@ class PBView(TreeView):
lst_dir += [f for f in tmplst lst_dir += [f for f in tmplst
if os.path.isdir(os.path.join(e[1],f)) ] if os.path.isdir(os.path.join(e[1],f)) ]
lst_mjd = list(set(lst_mjd)) lst_mjd = list(set(lst_mjd))
lst_patch= list(set(lst_patch)) lst_patch= list(set(lst_patch))
lst_dir = list(set(lst_dir)) lst_dir = list(set(lst_dir))
lst_mjd = sorted(lst_mjd)
lst_dir = sorted(lst_dir)
return (lst_mjd,lst_patch, lst_dir) return (lst_mjd,lst_patch, lst_dir)
@cherrypy.expose @cherrypy.expose
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment