diff --git a/openstack_dashboard/dashboards/project/volumes/forms.py b/openstack_dashboard/dashboards/project/volumes/forms.py index 868719ff04..6692f6cebd 100644 --- a/openstack_dashboard/dashboards/project/volumes/forms.py +++ b/openstack_dashboard/dashboards/project/volumes/forms.py @@ -402,6 +402,7 @@ class CreateForm(forms.SelfHandlingForm): # Create from volume volume = self.get_volume(request, data["volume_source"]) volume_id = volume.id + volume_type = None if data['size'] < volume.size: error_message = (_('The volume size cannot be less than ' diff --git a/openstack_dashboard/dashboards/project/volumes/tests.py b/openstack_dashboard/dashboards/project/volumes/tests.py index 01e459074f..3c45a42afc 100644 --- a/openstack_dashboard/dashboards/project/volumes/tests.py +++ b/openstack_dashboard/dashboards/project/volumes/tests.py @@ -537,7 +537,7 @@ class VolumeViewTests(test.ResetImageAPIVersionMixin, test.TestCase): filters={'visibility': 'shared', 'status': 'active'}) self.mock_volume_create.assert_called_once_with( test.IsHttpRequest(), formData['size'], formData['name'], - formData['description'], '', metadata={}, snapshot_id=None, + formData['description'], None, metadata={}, snapshot_id=None, group_id=None, image_id=None, availability_zone=None, source_volid=volume.id) self.mock_group_list.assert_called_once_with(test.IsHttpRequest())