diff options
author | 2009-07-31 00:52:29 +0200 | |
---|---|---|
committer | 2009-07-31 10:51:40 +0200 | |
commit | 2f4a0f1d02c7b2fe9979a86345432ccc01adfc8b (patch) | |
tree | fe0af30bbcd48c147c9fe0248aaed0ccd497c28e | |
parent | [db] fixed add_packageproperties return value (diff) | |
download | collagen-2f4a0f1d02c7b2fe9979a86345432ccc01adfc8b.tar.gz collagen-2f4a0f1d02c7b2fe9979a86345432ccc01adfc8b.tar.bz2 collagen-2f4a0f1d02c7b2fe9979a86345432ccc01adfc8b.zip |
[db] Fix content save db function
initial data were bogus and also I mixed order how they are in dict
returned from dbapi
-rw-r--r-- | src/matchbox/db/__init__.py | 8 |
1 files 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, |