From 0967b0fee314ccc46432c92b3e42a962ec355e23 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 27 Nov 2010 23:12:58 +0100 Subject: [PATCH] Add queue ID to renamehistory, else just put in 0 --- app/lib/cron/renamer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/lib/cron/renamer.py b/app/lib/cron/renamer.py index 317d9cef..9d0f2cba 100644 --- a/app/lib/cron/renamer.py +++ b/app/lib/cron/renamer.py @@ -318,7 +318,11 @@ def renameFiles(self, movie): h = RenameHistory() Db.add(h) - h.movieQueue = movie['queue'].id if movie['queue'] else 0 + try: + h.movieQueue = movie['queue'].id + except: + h.movieQueue = 0 + h.old = unicode(old.decode('utf-8')) h.new = unicode(dest.decode('utf-8')) Db.flush()