Fix 'IndexError' exception

This commit is contained in:
Raffson 2023-09-08 17:16:35 +02:00
parent 1ba3f2fbb4
commit d22bfd0804
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -46,7 +46,7 @@ class TgoJs(BaseModel):
detection_ranges=detection_ranges,
dead=tgo.is_dead,
sidc=str(tgo.sidc()),
task=tgo.groups[0].ground_object.task,
task=tgo.groups[0].ground_object.task if tgo.groups else None,
)
@staticmethod