]> Softwares of Agnibho - librevax.git/commitdiff
Bugfix: home to login
authorAgnibho Mondal <mondal@agnibho.com>
Thu, 14 Mar 2024 17:25:22 +0000 (22:55 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Thu, 14 Mar 2024 17:25:22 +0000 (22:55 +0530)
librevax.py

index 8a70253f54ced1866dffc33d5959ebcad9383cc5..d1580ed5c2bb4da701a94fad14eca04042f7f4fe 100644 (file)
@@ -25,8 +25,6 @@ def preload():
 @app.route("/")
 def index():
     try:
-        #if((ret:=problem())!="go"):
-        #    return ret
         cursor=get_db().cursor()
         (ok, mc)=multicenter.read(cursor, session["mid"])
         if(not ok):
@@ -35,6 +33,8 @@ def index():
         if(not ok):
             raise exception(pat)
         return render_template("index.html", center=mc, patient=pat)
+    except KeyError as e:
+        return redirect("/login")
     except Exception as e:
         raise(e)
         return render_template("error.html", data=e)