Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drafts not being displayed when clicking between sources #762

Closed
redshiftzero opened this issue Feb 3, 2020 · 2 comments · Fixed by #764
Closed

drafts not being displayed when clicking between sources #762

redshiftzero opened this issue Feb 3, 2020 · 2 comments · Fixed by #764
Labels
bug Something isn't working

Comments

@redshiftzero
Copy link
Contributor

I just noticed this while trying to get STR for #734

STR

  1. Apply server diff that will fail replies after a delay:
diff --git a/securedrop/journalist_app/api.py b/securedrop/journalist_app/api.py
index cf6d76585..8cd3e8a61 100644
--- a/securedrop/journalist_app/api.py
+++ b/securedrop/journalist_app/api.py
@@ -237,6 +238,15 @@ def make_blueprint(config):
             if 'reply' not in request.json:
                 abort(400, 'reply not found in request body')

+            import time
+            time.sleep(5)
+            abort(409, 'That UUID is already in use.')
+
             user = get_user_object(request)
  1. Send test reply to a source
  2. Click to another source
  3. Click back to the initial source

Expected behavior

Draft is shown in whatever state it's in (pending, successful, failed)

Actual behavior

Draft is not displayed in conversation view

@redshiftzero redshiftzero added the bug Something isn't working label Feb 3, 2020
@redshiftzero
Copy link
Contributor Author

@redshiftzero
Copy link
Contributor Author

seems like we do this in case the draft was converted to a successful reply. however, we still have draft replies we do want to display in their pending or failed state in the conversation view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant