From: Art Rhyno Date: Mon, 14 Apr 2014 00:47:36 +0000 (-0400) Subject: Quick fix for single item links X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f2162845a7d6da9fddd01d923ea583b1529498fe;p=syrup%2Fmasslnc.git 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 --- 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))