Send generic 502 if firmware building fails

This commit is contained in:
Kumi 2019-02-09 16:51:06 +00:00
parent 9d32307f34
commit 5c885db6b1

View file

@ -313,7 +313,7 @@ def getconfig(request, device_id):
device = get_object_or_404(Device, id=device_id)
if not mkfirmware(device, FWDIR):
return HttpResponse("Something went wrong generating the firmware image. The server may be busy, please try again later.")
return HttpResponse(status=502)
sigUpdateDevice(device.serial, None, False)
device.update = False