summaryrefslogtreecommitdiffstats
path: root/module/FileDatabase.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/FileDatabase.py')
-rw-r--r--module/FileDatabase.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py
index 1c2667732..a59632bb8 100644
--- a/module/FileDatabase.py
+++ b/module/FileDatabase.py
@@ -189,6 +189,10 @@ class FileHandler:
"""deletes links"""
f = self.getFile(id)
+
+ if not f:
+ return None
+
e = RemoveEvent("file", id, "collector" if not f.package().queue else "queue")
@@ -243,6 +247,10 @@ class FileHandler:
def getPackageData(self, id):
"""returns dict with package information"""
pack = self.getPackage(id)
+
+ if not pack:
+ return None
+
pack = pack.toDict()[id]
data = self.db.getPackageData(id)