mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-25 00:34:32 +00:00
Allow spots and alerts to have multiple activities #143
This commit is contained in:
@@ -2,7 +2,7 @@ from datetime import datetime
|
||||
|
||||
import pytz
|
||||
|
||||
from core.enums import ActivityName
|
||||
from core.enums import ActivityName, ActivityRefType
|
||||
from data.activity_ref import ActivityRef
|
||||
from data.alert import Alert
|
||||
from providers.alert.http_alert_provider import HTTPAlertProvider
|
||||
@@ -38,12 +38,13 @@ class Hamsat(HTTPAlertProvider):
|
||||
dx_grid=source_alert["grids"][0],
|
||||
freqs_modes=freqs_modes,
|
||||
comment=source_alert["comment"],
|
||||
activity=ActivityName.SATELLITE,
|
||||
activities=[ActivityName.SATELLITE],
|
||||
# Fudge an activity ref to provide the remaining bits of data we need: the satellite and the operator's grid
|
||||
activity_refs=[
|
||||
ActivityRef(
|
||||
activity=ActivityName.SATELLITE,
|
||||
id=source_alert["satellite"]["name"],
|
||||
ref_type=ActivityRefType.SATELLITE
|
||||
)
|
||||
],
|
||||
start_time=datetime.strptime(source_alert["aos_at"], "%Y-%m-%dT%H:%M:%SZ")
|
||||
|
||||
Reference in New Issue
Block a user