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

possible error with the /add route , throws internal server error #882

Merged
merged 8 commits into from
Mar 29, 2024
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion artemis/templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@


def dedent(text: str) -> str:
if(text==None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not text.

BTW, please run linter (according to https://github.com/cert-polska/artemis?tab=readme-ov-file#code-formatting)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done so.

return ''
return textwrap.dedent(text)


def render_markdown(markdown_text: str) -> str:
if(markdown_text==None):
return ''
return markdown.markdown(markdown_text)


Expand Down