From 3f37741ae7df9bd2392fe6eb95af22bd5a2d7f6a Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 27 Dec 2015 16:43:19 -0800 Subject: [PATCH] Avoid log spam on invalid instance channels. --- channel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/channel.py b/channel.py index 245f98d..25b9148 100644 --- a/channel.py +++ b/channel.py @@ -47,7 +47,8 @@ class OnChannelDisconnect(webapp2.RequestHandler): def post(self): instance_id = self.request.get('from') instance = models.Instance.FromID(instance_id) - instance.Delete() + if instance: + instance.Delete() app = webapp2.WSGIApplication([