diff --git a/aleksis/core/util/pdf.py b/aleksis/core/util/pdf.py
index f275cc806d337806bd86fe88cfc6d6a6ef09b0e2..880cbb01e1e7e76b97e5abae25e5b6a482c8a789 100644
--- a/aleksis/core/util/pdf.py
+++ b/aleksis/core/util/pdf.py
@@ -64,9 +64,7 @@ def generate_pdf(
         pdf_path = os.path.join(temp_dir, "print.pdf")
         lang = lang or get_language()
 
-        asyncio.get_event_loop().run_until_complete(
-            _generate_pdf_with_chromium(temp_dir, pdf_path, html_url, lang)
-        )
+        asyncio.run(_generate_pdf_with_chromium(temp_dir, pdf_path, html_url, lang))
 
         # Upload PDF file to media storage
         with open(pdf_path, "rb") as f: