forked from Github/frigate
Fix bad check on np.array (#6968)
This commit is contained in:
@@ -1118,7 +1118,7 @@ def latest_frame(camera_name):
|
|||||||
height = int(request.args.get("h", str(frame.shape[0])))
|
height = int(request.args.get("h", str(frame.shape[0])))
|
||||||
width = int(height * frame.shape[1] / frame.shape[0])
|
width = int(height * frame.shape[1] / frame.shape[0])
|
||||||
|
|
||||||
if not frame:
|
if frame is None:
|
||||||
return "Unable to get valid frame from {}".format(camera_name), 500
|
return "Unable to get valid frame from {}".format(camera_name), 500
|
||||||
|
|
||||||
if height < 1 or width < 1:
|
if height < 1 or width < 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user