From f2162845a7d6da9fddd01d923ea583b1529498fe Mon Sep 17 00:00:00 2001 From: Art Rhyno Date: Sun, 13 Apr 2014 20:47:36 -0400 Subject: [PATCH] Quick fix for single item links There was a scenario where a single item was getting a bad link. This should fix that problem. Signed-off-by: Art Rhyno --- conifer/integration/evergreen_site.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conifer/integration/evergreen_site.py b/conifer/integration/evergreen_site.py index b1d3bb1..1b30ac9 100644 --- a/conifer/integration/evergreen_site.py +++ b/conifer/integration/evergreen_site.py @@ -464,7 +464,7 @@ class EvergreenIntegration(object): #remove offset info, %z is flakey for some reason rawdate = rawdate[:-5] duetime = time.strptime(rawdate, self.TIME_FORMAT) - elif len(allcalls) == 0: + elif len(allcalls) == 0 and copy.syrup_id != -1: dueid = [copy.syrup_id,LOCKED] #get due information - lots of extra pieces needed for embedded parts @@ -479,7 +479,7 @@ class EvergreenIntegration(object): earliestdue = duetime dueinfo = time.strftime(self.DUE_FORMAT,earliestdue) #will want the link to be to the earliest item if not multipart - if len(allcalls) == 0 and dueid[1] != LOCKED: + if len(allcalls) == 0 and dueid[1] != LOCKED and copy.syrup_id != -1: dueid = [copy.syrup_id,DUE] alldisplay = '%s (DUE: %s)' % (callno,time.strftime(self.DUE_FORMAT,earliestdue)) -- 2.11.0