diff --git a/models/Campus.py b/models/Campus.py index 4859409..f4e9cef 100644 --- a/models/Campus.py +++ b/models/Campus.py @@ -11,12 +11,12 @@ class Campus(db.Model): master_user_id = db.IntegerProperty(required=True) def to_JSON(self): - dick = {'title': self.title, + data = {'title': self.title, 'email_ending': self.email_ending, 'master_user_id': self.master_user_id, 'avatar_url': self.avatar_url } - return json.dumps(dick) + return json.dumps(data) """ diff --git a/models/User.py b/models/User.py index ed0e2c1..c336d36 100644 --- a/models/User.py +++ b/models/User.py @@ -12,8 +12,8 @@ class User(db.Model): seToken = db.StringProperty(required=True) avatar_url = db.StringProperty(required=True) isFirstLogin = db.BooleanProperty(default=True) - campuses_id_list = db.StringListProperty() - classes_id_list = db.StringListProperty() + campuses_id_list = db.StringListProperty(default=[]) + classes_id_list = db.StringListProperty(default=[]) def to_JSON(self): data = {'username' : self.username,