Skip to content

Instantly share code, notes, and snippets.

@sssoleileraaa
Created September 3, 2020 22:19
Show Gist options
  • Save sssoleileraaa/8793d5ec4d28f034f2c1e8320a93866a to your computer and use it in GitHub Desktop.
Save sssoleileraaa/8793d5ec4d28f034f2c1e8320a93866a to your computer and use it in GitHub Desktop.
This is the patch to apply before regenerating new cassettes used by functional tests in the securedrop-client
user@dev:~/src/securedrop$ git diff
diff --git a/securedrop/models.py b/securedrop/models.py
index ad991e6c3..1c954b9a6 100644
--- a/securedrop/models.py
+++ b/securedrop/models.py
@@ -658,6 +658,7 @@ class Journalist(db.Model):
try:
user = Journalist.query.filter_by(username=username).one()
+ return user
except NoResultFound:
raise InvalidUsernameException(
"invalid username '{}'".format(username))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment