From 4a0fcc2a2c8255b574514090668e445dfad2bc69 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Fri, 30 Aug 2019 12:29:59 -0400 Subject: [PATCH] More robust patron-load interface Feels bad to be hard-coding the path in the template, but something in the reverse proxy broke, so let's just ensure that we're complying with expectations. Not a bad thing to add in an isnumeric() check for example. Signed-off-by: Dan Scott --- tools/patron-load/templates/index.html | 2 +- tools/patron-load/webui.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/patron-load/templates/index.html b/tools/patron-load/templates/index.html index 90e2de8542..d9e51c0ed3 100644 --- a/tools/patron-load/templates/index.html +++ b/tools/patron-load/templates/index.html @@ -28,7 +28,7 @@ $if uid: and affiliation with Laurentian (student, staff, faculty, alumnus).

Create an account

-
+
diff --git a/tools/patron-load/webui.py b/tools/patron-load/webui.py index 8a1af80bdf..49437dbbe6 100644 --- a/tools/patron-load/webui.py +++ b/tools/patron-load/webui.py @@ -28,10 +28,12 @@ class Index: i = web.input(uid=None) - if i.uid: + if i.uid and i.uid.isnumeric(): uid = i.uid + else: + uid = None - if uid: + if uid is not None: self.args.uid(uid) users = ldap_osrf_sync.main(self.args) -- 2.11.0