diff --git a/controller/Notebooks.py b/controller/Notebooks.py index 86f81b3..cf5f74a 100644 --- a/controller/Notebooks.py +++ b/controller/Notebooks.py @@ -1263,8 +1263,8 @@ class Notebooks( object ): user = self.__database.load( User, note.user_id ) writer.writerow( ( - note.contents.encode( "utf8" ), - note.title.encode( "utf8" ), + note.contents and note.contents.encode( "utf8" ) or None, + note.title and note.title.encode( "utf8" ) or None, note.object_id, note.startup and 1 or 0, note.user_id and user and user.username.encode( "utf8" ) or u"", diff --git a/controller/test/Test_controller.py b/controller/test/Test_controller.py index 8b5554a..2373fad 100644 --- a/controller/test/Test_controller.py +++ b/controller/test/Test_controller.py @@ -120,14 +120,6 @@ class Test_controller( object ): u"stream_response": True, u"encoding_filter.on": False, }, - u"/files/thumbnail": { - u"stream_response": True, - u"encoding_filter.on": False, - }, - u"/files/image": { - u"stream_response": True, - u"encoding_filter.on": False, - }, u"/notebooks/export_csv": { u"stream_response": True, u"encoding_filter.on": False, diff --git a/controller/test/Test_notebooks.py b/controller/test/Test_notebooks.py index 23faeab..bbdfb9d 100644 --- a/controller/test/Test_notebooks.py +++ b/controller/test/Test_notebooks.py @@ -3542,13 +3542,13 @@ class Test_notebooks( Test_controller ): assert result.get( "error" ) - def test_export_csv( self, note_text = None ): + def test_export_csv( self, note_contents = None ): self.login() - if not note_text: - note_text = u"foo" + if not note_contents: + note_contents = u"