From 0d5c8f385f93223682b6081c632276a8988f4c09 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 7 Feb 2018 08:02:49 -0500 Subject: [PATCH] fix DiskSpace summing when Nulls are present --- db/zm_update-1.31.37.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/zm_update-1.31.37.sql b/db/zm_update-1.31.37.sql index 0d66e0282..866fd9330 100644 --- a/db/zm_update-1.31.37.sql +++ b/db/zm_update-1.31.37.sql @@ -46,4 +46,4 @@ FOR EACH ROW // -UPDATE Storage SET DiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE StorageId=Storage.Id)// +UPDATE Storage SET DiskSpace=(SELECT SUM(COALESCE(DiskSpace,0)) FROM Events WHERE StorageId=Storage.Id)//