chore [P-01]: подтянул бэк

This commit is contained in:
Denis Voinovich committed 2025-06-03 10:05:52 +03:00
commit ff837bdc72
1 file changed
+2 -5
+2 -5
View File
@@ -339,11 +339,8 @@ class TestingView(generics.ListCreateAPIView):
testing_url = make_clickable(testing.test.name, testing_url = make_clickable(testing.test.name,
f"/test/testdetail/{testing.test.id}?mode=exam") f"/test/testdetail/{testing.test.id}?mode=exam")
news_img_path = testing.test.file.path if testing.test.file else None news_img = testing.test.file 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 = News( news = News(
title="Пройдите тестирование!", title="Пройдите тестирование!",
text=f'Пройдите тестирование "{testing_url}" до {formatted_date}', text=f'Пройдите тестирование "{testing_url}" до {formatted_date}',