postgresで出るエラーに対処
メッセージがない場合に出るエラーに対処
@@ -370,8 +370,8 @@ | ||
370 | 370 | prevnext_nav(req,_('メール'), _('リストに戻る')) |
371 | 371 | |
372 | 372 | |
373 | - if target_threadroot == '': | |
374 | - target_threadroot = messageid | |
373 | + #if target_threadroot == '': | |
374 | + # target_threadroot = messageid | |
375 | 375 | |
376 | 376 | ref_count=0 |
377 | 377 | reflist = [] |
@@ -457,7 +457,7 @@ | ||
457 | 457 | mls[-1]['yearmonths'].append(category_item) |
458 | 458 | |
459 | 459 | attachments_list = {} |
460 | - cursor.execute("SELECT DISTINCT attachment.id as id ,mailarc.id as id2, utcdate FROM mailarc,attachment WHERE mailarc.category=%s AND mailarc.id = attachment.id AND attachment.type='mailarchive' ORDER BY utcdate",(target_category.encode('utf-8'),)) | |
460 | + cursor.execute("SELECT DISTINCT attachment.id as id ,mailarc.id as id2, utcdate FROM mailarc,attachment WHERE mailarc.category=%s AND CAST('mailarc.id' as text) = attachment.id AND attachment.type='mailarchive' ORDER BY utcdate",(target_category.encode('utf-8'),)) | |
461 | 461 | for id,id2,utcdate in cursor: |
462 | 462 | attachments_list[str(id)] = 1 |
463 | 463 |