I'm doing a spatial join, but the styling doesn't work. What needs to be fixed?
##Style=name
##drivetimepoints=vector
##gridwgs84layer=vector
##DriveTimeGrid=output vector
outputs_QGISJOINATTRIBUTESBYLOCATION_1=processing.runalg('qgis:joinattributesbylocation', gridwgs84layer,drivetimepoints,['intersects'],0.0,0,'sum,mean,min,max,median',0,DriveTimeGrid)
layer = processing.getObject(outputs_QGISJOINATTRIBUTESBYLOCATION_1['OUTPUT'])
layer.loadNamedStyle("C:/QGIS Style File/Drive Time Grids.qml")
layer.triggerRepaint()