@@ -307,7 +307,9 @@ def sync_deployments(molnix_deployments, molnix_api, countries):
307307 try :
308308 deployment = PersonnelDeployment .objects .get (is_molnix = True , event_deployed_to = event )
309309 except Exception :
310- logger .warning ("Did not import Deployment with Molnix ID %d. Invalid Event." % md ["id" ])
310+ warning = "Did not import Deployment with Molnix ID %d. Invalid Event." % md ["id" ]
311+ logger .warning (warning )
312+ warnings .append (warning )
311313 prt ("Did not import Deployment. Invalid Event" , md ["id" ])
312314 continue
313315
@@ -316,7 +318,9 @@ def sync_deployments(molnix_deployments, molnix_api, countries):
316318 if md ["position_id" ]:
317319 surge_alert = SurgeAlert .objects .get (molnix_id = md ["position_id" ])
318320 except Exception :
319- logger .warning ("%d deployment did not find SurgeAlert with Molnix position_id %d." % (md ["id" ], md ["position_id" ]))
321+ warning = "%d deployment did not find SurgeAlert with Molnix position_id %d." % (md ["id" ], md ["position_id" ])
322+ logger .warning (warning )
323+ warnings .append (warning )
320324 prt ("Deployment did not find SurgeAlert" , md ["id" ], md ["position_id" ])
321325 continue
322326
@@ -327,7 +331,9 @@ def sync_deployments(molnix_deployments, molnix_api, countries):
327331 if md ["person" ] and "sex" in md ["person" ]:
328332 gender = md ["person" ]["sex" ]
329333 except Exception :
330- logger .warning ("Did not find gender info in %d" % md ["id" ])
334+ warning = "Did not find gender info in %d" % md ["id" ]
335+ logger .warning (warning )
336+ warnings .append (warning )
331337 continue
332338
333339 location = None
0 commit comments