--- a/src/ldt/ldt/ldt_utils/views/workspace.py Tue Jan 22 09:41:36 2013 +0100
+++ b/src/ldt/ldt/ldt_utils/views/workspace.py Tue Jan 22 11:25:55 2013 +0100
@@ -323,18 +323,19 @@
results.sort(key=lambda k: k['iri_id'])
for iri_id, item in groupby(results, itemgetter('iri_id')):
- content=[]
+ content=None
content_filter = filter(lambda e: e.iri_id == iri_id, all_contents)
if len(content_filter)>0:
content = content_filter[0]
if content.description is None:
content.description = ''
-
+ if content is None:
+ continue
all_related_segments = list(item)
valid_segments = []
for s in all_related_segments:
- array_of_segs = [seg for seg in all_segments if seg.element_id == s['element_id'] and seg.project_id == s['project_id'] and seg.iri_id == s['iri_id'] and seg.cutting_id == s['cutting_id'] and seg.ensemble_id == s['ensemble_id'] ]
+ array_of_segs = [seg for seg in all_segments if (seg.element_id == s['element_id'] and seg.project_id == s['project_id'] and seg.iri_id == s['iri_id'] and seg.cutting_id == s['cutting_id'] and seg.ensemble_id == s['ensemble_id']) ]
if len(array_of_segs)>0:
segment = array_of_segs[0]