From 677dd6c9362c53bffc0556cad4208a47f8280814 Mon Sep 17 00:00:00 2001 From: pengyuesheng Date: Mon, 28 Jan 2019 09:25:48 +0800 Subject: [PATCH] Error should be reported when only a space is entered Change-Id: Ie6bfb7e811ceba80bdef8a3cc03df1cde1ac6b86 Closes-Bug: #1813508 --- .../dashboard/project/containers/containers.controller.js | 2 +- .../dashboard/project/containers/containers.controller.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.controller.js b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.controller.js index a695b4d0dc..afbe1ffd6b 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.controller.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.controller.js @@ -223,7 +223,7 @@ ]; function createContainer() { - var model = {name: '', public: false}; + var model = {public: false}; var config = { title: gettext('Create Container'), schema: createContainerSchema, diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.controller.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.controller.spec.js index 5dad58ab2c..c8e9e73c0a 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.controller.spec.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/containers/containers.controller.spec.js @@ -206,7 +206,7 @@ // when the modal is resolved, make sure create is called deferred.resolve(); $rootScope.$apply(); - expect(ctrl.createContainerAction).toHaveBeenCalledWith({name: '', public: false}); + expect(ctrl.createContainerAction).toHaveBeenCalledWith({public: false}); }); it('should check for container existence - with presence', function test() {