This commit is contained in:
cja committed 2025-06-03 10:05:09 +03:00
1 parent 7b107c7d34
commit 82d4796936
1 file changed
+2 -5
+2 -5
View File
@@ -339,11 +339,8 @@ class TestingView(generics.ListCreateAPIView):
testing_url = make_clickable(testing.test.name,
f"/test/testdetail/{testing.test.id}?mode=exam")
news_img_path = testing.test.file.path if testing.test.file else None
if news_img_path and os.path.isfile(news_img_path):
news_img = testing.test.file
else:
news_img = os.path.join("defaultimg", "vote.png")
news_img = testing.test.file if testing.test.file else None
news = News(
title="Пройдите тестирование!",
text=f'Пройдите тестирование "{testing_url}" до {formatted_date}',