summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-02 19:43:43 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-02 19:43:43 +0200
commit0606f336d08a65651420ec6283680f210aab0f44 (patch)
tree66ea35e9239d3184b529f4d8faac305fccb365c7
parentfix db (diff)
downloadpyload-0606f336d08a65651420ec6283680f210aab0f44.tar.xz
api fix
-rw-r--r--module/database/FileDatabase.py5
-rw-r--r--module/web/templates/default/base.html4
2 files changed, 6 insertions, 3 deletions
diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py
index 70f814c51..d93fa6da4 100644
--- a/module/database/FileDatabase.py
+++ b/module/database/FileDatabase.py
@@ -96,7 +96,10 @@ class FileHandler:
packs = self.db.getAllPackages(queue)
data.update([(x.id, x.toDbDict()[x.id]) for x in self.cache.values()])
- packs.update([(x.id, x.toDict()[x.id]) for x in self.packageCache.values() if x.queue == queue])
+
+ for x in self.packageCache.itervalues():
+ if x.queue != queue or x.id not in packs: continue
+ packs[x.id].update(x.toDict()[x.id])
for key, value in data.iteritems():
if value["package"] in packs:
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index 5b6854525..4057d320c 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -41,8 +41,8 @@ document.addEvent("domready", function(){
if ($('add_name').value == "" && $('add_file').value == ""){
alert("{{_("Please Enter a packagename.")}}");
return false;
- }else{
- out();
+ } else {
+ out();
}
};