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

Preview view fails due to KeyError #89

Closed
torgeirl opened this issue Jun 17, 2019 · 4 comments
Closed

Preview view fails due to KeyError #89

torgeirl opened this issue Jun 17, 2019 · 4 comments
Labels
Milestone

Comments

@torgeirl
Copy link
Contributor

The call to cradmin_legacy's get_preview_data made in trix_admin/views/assignments.py fails due to a KeyError.

The transaction is set to be /a/{roleid}/assignments/preview/{pk} while the URL seems to /a/{courseid}/assignments/preview/.

@torgeirl torgeirl added the bug label Jun 17, 2019
@Elthan
Copy link
Contributor

Elthan commented Jun 17, 2019

When is this error occurring?

@torgeirl
Copy link
Contributor Author

@Elthan: I believe it's certain previews from the admin view. At least, that what the URL suggests.

@Elthan
Copy link
Contributor

Elthan commented Jun 17, 2019

Ok, do you have an example or something I can look at?

@torgeirl
Copy link
Contributor Author

I guess 5f58c5b might be intended to address this issue.

Elthan added a commit to Elthan/trix2 that referenced this issue Aug 8, 2019
Removed "handling" of no 'pk' in /preview, it will now instead lead to a 404 page if no assignment id is given to preview. This is consistent with other URLs in the app.
@torgeirl torgeirl added this to the Trix 3.0 milestone May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants