Need to make the client_id even shorter. Switch to id()

This commit is contained in:
Ian Gulliver
2014-05-23 11:40:08 -07:00
parent 0e87448f6f
commit 1ec2340f48
3 changed files with 6 additions and 6 deletions

View File

@@ -25,8 +25,8 @@ class OnChannelConnect(webapp2.RequestHandler):
@utils.local_namespace
@db.transactional()
def post(self):
instance_key = self.request.get('from')
instance = models.Instance.get(instance_key)
instance_id = self.request.get('from')
instance = models.Instance.get_by_id(instance_id)
instance.active = True
instance.put()
@@ -34,8 +34,8 @@ class OnChannelConnect(webapp2.RequestHandler):
class OnChannelDisconnect(webapp2.RequestHandler):
@utils.local_namespace
def post(self):
instance_key = self.request.get('from')
instance = models.Instance.get(instance_key)
instance_id = self.request.get('from')
instance = models.Instance.get_by_id(instance_id)
subscriptions = models.Subscription.all().filter('instance =', instance)
for subscription in subscriptions: