AtlasOfLivingAustralia / alerts

Alerts services
https://alerts.ala.org.au
Other
1 stars 6 forks source link

checkStatus fails when there is no queryResult #226

Open adam-collins opened 2 weeks ago

adam-collins commented 2 weeks ago

NotificationService.checkStatus can fail when qr = QueryResult.findById(qr.id) returns null.

A subset of the exception is

java.lang.NullPointerException: Cannot get property 'lastChecked' on null object
        at au.org.ala.alerts.NotificationService.$tt__checkStatus(NotificationService.groovy:108)
        at au.org.ala.alerts.NotificationService$__tt__checkQueryForFrequency_closure65.doCall(NotificationService.groovy:881)
        at au.org.ala.alerts.NotificationService.$tt__checkQueryForFrequency(NotificationService.groovy:877)
        at au.org.ala.alerts.NotificationService.$tt__checkQueryForFrequency(NotificationService.groovy:856)
qifeng-bai commented 6 days ago

Fixed, linked to #228