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)//