chore [P-01]: подтянул бэк
This commit is contained in:
commit
ff837bdc72
1 file changed
+2
-5
@@ -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}',
|
||||
|
||||
Reference in new issue
Block a user