Commit e0132b61 authored by Administrator's avatar Administrator

[FIX] sometimes row is None, why ?

parent 439d8929
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.auth.views import login
from gargantext_web.views import home, projects, project, corpus
from gargantext_web.views import delete_project, delete_corpus
......
......@@ -405,7 +405,8 @@ def send_csv(request, corpus_id):
row = cursor.fetchone()
if row is None:
break
writer.writerow([ row[0] + '/' + row[1] + '/' + row[2] , str(row[3]) ])
if row[0] is not None and row[1] is not None and row[2] is not None and row[3] is not None:
writer.writerow([ str(row[0]) + '/' + str(row[1]) + '/' + str(row[2]) , str(row[3]) ])
#dates['last']['day'] = documents.last().metadata['publication_day'])
cursor.close()
......
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