Beobachtungsvorschlaege um Objektbilder und Namen erweitern

This commit is contained in:
2026-09-15 20:14:04 +02:00
parent d80382bd3f
commit 23ad1973fb
7 changed files with 125 additions and 12 deletions
+3 -1
View File
@@ -44,7 +44,7 @@ def validate(payload):
raw = payload['filters']
result = {}
for key, low, high, optional in (
('object_size_min', 0, 1296000, True), ('object_size_max', 0, 1296000, True),
('object_size_min', 0, 3600, True), ('object_size_max', 0, 3600, True),
('object_magnitude', -40, 40, True), ('object_altitude_min', 0, 90, False),
('object_altitude_max', 0, 90, False), ('object_azimuth_start', 0, 360, False),
('object_azimuth_end', 0, 360, False), ('sun_altitude_max', -90, 0, False),
@@ -269,6 +269,8 @@ def calculate(payload):
if best:
results.append({'id': obj['id'], 'name': obj['name'], 'group': group, 'type': LABELS[group],
'size_arcsec': obj.get('size_arcsec'), 'best': best, 'intervals': intervals,
'image': obj.get('image'),
'common_name': obj.get('common_name'),
'magnitude_note': 'Modellschätzung' if moving else 'Katalogwert',
'note': obj.get('note', '')})
except (ValueError, TypeError, ZeroDivisionError, OverflowError):