# HG changeset patch # User Ludovic Chabant # Date 1717967825 0 # Sun Jun 09 21:17:05 2024 +0000 # Node ID 4ebf1d1181e66e454cbc841bacc8822d4d12076b # Parent 27691c7f2d7b2c72c71379fcf247253f271d3ef1 Don't crash the web interface if more than one user matches an email address diff --git a/hgsrht/app.py b/hgsrht/app.py --- a/hgsrht/app.py +++ b/hgsrht/app.py @@ -67,7 +67,7 @@ self.url_map.strict_slashes = False def lookup_user(self, email): - return User.query.filter(User.email == email).one_or_none() + return User.query.filter(User.email == email).first() app = HgApp() # Add a middleware that will capture requests that look like mercurial