Визуальные изменение. Доработки и фиксы багов
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user