Open
Conversation
`slashed_robot_log` was not expanded so it resulted in a literal
`{slashed_robot.id}` ecc. and `_logs` in `api/admin.py` threw an
exception here:
```python
with_hyperlinks = objects_to_hyperlinks(obj.logs)
try:
html_logs = format_html(
f'<table style="width: 100%">{with_hyperlinks}</table>'
)
except Exception as e:
html_logs = f"An error occurred while formatting the parsed logs as HTML. Exception {e}"
```
Also removed a trailing parenthesis.
8087695 to
e3a11c7
Compare
Contributor
Author
|
@jerryfletcher21 I cherry picked the commit from your branch, and rebased my branch. Would you mind submitting an approval just for documentation purposes? |
jerryfletcher21
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes error while rendering order logs.

In api/logics.py, the log line was being added without interpolation, so the exact string below was added to the logs:
When this log was rendered, the function
format_htmlwould try to interpolate values within brackets (slashed_robot), and would fail because no argument is being passed.It would only make sense to use
format_htmlif we are passing arguments like this:Checklist before merging
pip install pre-commit, thenpre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.