diff --git a/muk_utils/__manifest__.py b/muk_utils/__manifest__.py index b93790a..20d019a 100644 --- a/muk_utils/__manifest__.py +++ b/muk_utils/__manifest__.py @@ -22,7 +22,7 @@ { "name": "MuK Utils", "summary": """Utility Features""", - "version": '12.0.2.0.4', + "version": '12.0.2.0.5', "category": 'Extra Tools', "license": "LGPL-3", "author": "MuK IT", diff --git a/muk_utils/models/ir_attachment.py b/muk_utils/models/ir_attachment.py index 8714485..1d1a2df 100644 --- a/muk_utils/models/ir_attachment.py +++ b/muk_utils/models/ir_attachment.py @@ -103,7 +103,7 @@ class IrAttachment(models.Model): @api.multi def migrate(self, batch_size=None): commit_on_batch = bool(batch_size) - batch_size = batch_size or len(self) + batch_size = batch_size or len(self) or 1 storage_location = self._storage().upper() batches = math.ceil(len(self) / batch_size) for index, attachment in enumerate(self, start=1):