Переосмыслил отметки по ВЧ загрузке. Улучшил статистику

This commit is contained in:
2025-12-10 17:43:38 +03:00
parent 4949a03e68
commit 41e8dc30fd
16 changed files with 1834 additions and 980 deletions

View File

@@ -359,20 +359,9 @@ class SourceObjItemsAPIView(LoginRequiredMixin, View):
'mirrors': mirrors,
})
# Get marks for the source
# Отметки теперь привязаны к TechAnalyze, а не к Source
# marks_data оставляем пустым для обратной совместимости
marks_data = []
for mark in source.marks.all().order_by('-timestamp'):
mark_timestamp = '-'
if mark.timestamp:
local_time = timezone.localtime(mark.timestamp)
mark_timestamp = local_time.strftime("%d.%m.%Y %H:%M")
marks_data.append({
'id': mark.id,
'mark': mark.mark,
'timestamp': mark_timestamp,
'created_by': str(mark.created_by) if mark.created_by else '-',
})
return JsonResponse({
'source_id': source_id,