diff options
Diffstat (limited to 'jimbrella')
-rw-r--r-- | jimbrella/jform.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jimbrella/jform.py b/jimbrella/jform.py index dc9d769..c6503c1 100644 --- a/jimbrella/jform.py +++ b/jimbrella/jform.py @@ -77,9 +77,9 @@ class JForm: Keys of a dict in the list: - name: (string) Tenant's name. - - id: (uint) Tenant's student/faculty ID. + - id: (string) Tenant's student/faculty ID. - phone: (string) Tenant's phone number. - - key: (uint) Number of key to umbrella. + - key: (uint) Number of key to umbrella. Is None if it is not a number. - date: (datetime.datetime) When the jForm answer sheet was submitted. """ bookmark = self._read_bookmark() @@ -92,6 +92,7 @@ class JForm: resp = self._get(page=page) except: break # quietly abort + if resp.status_code != 200: break @@ -121,7 +122,7 @@ class JForm: "name": ans[0]["answer"], "id": ans[1]["answer"], "phone": ans[2]["answer"], - "key": int(ans[3]["answer"]), + "key": int(ans[3]["answer"]) if ans[3]["answer"].isdecimal() else None, "date": isoparse(sheet["submitted_at"]), } ) |