From 2c4fd3753c0e9f8d449d37594b5b401e2dc5dcee Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 17 Dec 2017 19:31:38 -0500 Subject: Doh, zones don't have retrieval dates. --- rp/rcynic/rcynicng | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rp/rcynic/rcynicng b/rp/rcynic/rcynicng index e22711e7..59c1bc31 100755 --- a/rp/rcynic/rcynicng +++ b/rp/rcynic/rcynicng @@ -1071,8 +1071,10 @@ class Fetcher(object): session_id = notification.get("session_id") serial = long(notification.get("serial")) - zone = RRDPZone.objects.filter( - session_id = session_id).order_by("-retrieved__started").first() + try: + zone = RRDPZone.objects.get(session_id = session_id) + except RRDPZone.DoesNotExist: + zone = None logger.debug("RRDP notification for %s session_id %s serial %s current zone %r", self.uri, session_id, serial, zone) -- cgit v1.2.3