Визуальные изменение. Доработки и фиксы багов

This commit is contained in:
2025-12-12 15:08:10 +03:00
parent f5875e5b87
commit 9bf701f05a
26 changed files with 1923 additions and 419 deletions

View File

@@ -591,11 +591,19 @@ class SatelliteDataAPIView(LoginRequiredMixin, View):
bands = list(satellite.band.values_list('name', flat=True))
bands_str = ', '.join(bands) if bands else '-'
# Get location place display
location_place_display = '-'
if satellite.location_place:
location_place_choices = dict(Satellite.PLACES)
location_place_display = location_place_choices.get(satellite.location_place, satellite.location_place)
data = {
'id': satellite.id,
'name': satellite.name,
'alternative_name': satellite.alternative_name or '-',
'norad': satellite.norad if satellite.norad else None,
'international_code': satellite.international_code or '-',
'location_place': location_place_display,
'bands': bands_str,
'undersat_point': satellite.undersat_point if satellite.undersat_point is not None else None,
'url': satellite.url or None,