Fix query error for earlier commit of today with custom metadata