From 2f4a0f1d02c7b2fe9979a86345432ccc01adfc8b Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Fri, 31 Jul 2009 00:52:29 +0200 Subject: [db] Fix content save db function initial data were bogus and also I mixed order how they are in dict returned from dbapi --- src/matchbox/db/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/matchbox/db/__init__.py b/src/matchbox/db/__init__.py index 0a4eeab..be52239 100644 --- a/src/matchbox/db/__init__.py +++ b/src/matchbox/db/__init__.py @@ -290,11 +290,11 @@ class DjangoDB(object): if len(filetype) == 0: raise DatabaseError ("Database not initialized from fixtures!!\nFile type loading failed (for type %s)" % type) filetype = filetype[0] - hash = None - size = None + hash = "" + size = 0 if type == 'obj': - hash = contents[path][1] - size = contents[path][2] + size = contents[path][1] + hash = contents[path][2] ppf = PackageProperties_File(file=file, filetype=filetype, -- cgit v1.2.3-65-gdbad