aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author藍挺瑋 <lantw44@gmail.com>2012-12-25 01:04:51 +0800
committerLAN-TW <lantw44@gmail.com>2012-12-25 01:04:51 +0800
commit367e6121545b5efb7fb0ce05414ce0dfef76c8c1 (patch)
treefa1acb9e7ead479e762378a4084b4bf5c1f4f84e
parent7e948fffa1a05465340f912391f7d1226e19edb9 (diff)
downloadinccalendar-367e6121545b5efb7fb0ce05414ce0dfef76c8c1.tar.gz
inccalendar-367e6121545b5efb7fb0ce05414ce0dfef76c8c1.tar.zst
inccalendar-367e6121545b5efb7fb0ce05414ce0dfef76c8c1.zip
修正提醒欄位為空白時的問題
-rw-r--r--access/insert.py6
-rw-r--r--access/update.py6
2 files changed, 10 insertions, 2 deletions
diff --git a/access/insert.py b/access/insert.py
index 166b5ab..72ac0eb 100644
--- a/access/insert.py
+++ b/access/insert.py
@@ -33,7 +33,11 @@ class InsertEvent(webapp2.RequestHandler):
minute = thisbeginminute
);
thisdatafrom = self.request.get('datafrom')
- thisremind = int(self.request.get('remind'))
+ thisremind = None
+ try:
+ thisremind = int(self.request.get('remind'))
+ except:
+ pass
newcalevent = CalEvent(
db.Key.from_path('user', guserid.email()),
diff --git a/access/update.py b/access/update.py
index 85e4894..e180d5d 100644
--- a/access/update.py
+++ b/access/update.py
@@ -36,7 +36,11 @@ class UpdateEvent (webapp2.RequestHandler) :
minute = thisbeginminute
);
thisdatafrom = self.request.get('datafrom')
- thisremind = int(self.request.get('remind'))
+ thisremind = None
+ try:
+ thisremind = int(self.request.get('remind'))
+ except:
+ pass
eventdata = db.get(mykey)
eventdata.icon = thisicon