From fdc926d94289c666cb4c5b6e0bc4f27fdbbb1d38 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 11 Jan 2013 13:22:07 +0000 Subject: [PATCH] Return correct field types for media path, desc, and mime svn: r21059 --- gramps/webapp/libdjango.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gramps/webapp/libdjango.py b/gramps/webapp/libdjango.py index d5e44f3b0..e8678c870 100644 --- a/gramps/webapp/libdjango.py +++ b/gramps/webapp/libdjango.py @@ -35,6 +35,7 @@ if sys.version_info[0] < 3: else: import pickle import base64 +import collections #------------------------------------------------------------------------ # @@ -52,7 +53,7 @@ from django.db import transaction import gramps.webapp.grampsdb.models as models from gramps.gen.lib import Name from gramps.gen.utils.id import create_id -import collections +from gramps.gen.utils.file import fix_encoding # To get a django person from a django database: # djperson = dji.Person.get(handle='djhgsdh324hjg234hj24') @@ -432,9 +433,9 @@ class DjangoInterface(object): date = self.get_date(media) return (str(media.handle), media.gramps_id, - media.path, - media.mime, - media.desc, + fix_encoding(media.path), + str(media.mime), + fix_encoding(media.desc), attribute_list, citation_list, note_list,