From 64cdadf6a13634fddbf1614eba5c01bc811b466c Mon Sep 17 00:00:00 2001 From: pengtao Date: Wed, 11 Sep 2019 20:26:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E6=8E=A5=E5=8F=A3=20get?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=BF=85=E9=A1=BB=E6=8F=90=E4=BE=9Bgameid?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/location.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handler/location.py b/handler/location.py index 0a6bc36..54411d7 100644 --- a/handler/location.py +++ b/handler/location.py @@ -28,6 +28,9 @@ class Location(Resource): def get(self): gameid = self.args['gameid'] + if not gameid: + log.error("get data from location failed!", exc_info=True) + return jsonify({"code": 500, "message": "PLS Input gameid!"}) channelid = self.args['channelid'] or 6001 sql = f"select gameid,channelid,id,area,type,mode from location where gameid={gameid} and channelid={channelid} and in_used=1;" try: