Handle warnings of type conversions when accessing batches
Description
Fix several warnings related to type conversions when accessing batches.
News snippet
Handle warnings of type conversions when accessing batches
Checklist
-
I have checked that my code follows the Octopus coding standards -
I have added tests for all the new features added in this request.