summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Naser <mnaser@vexxhost.com>2023-02-19 18:47:11 +0000
committerDr. Jens Harbott <frickler@offenerstapel.de>2023-03-24 06:07:24 +0000
commit858d4790cfc6cc3d6155e960ef4f7cae3c87bd73 (patch)
treecb3e89dbd0e4377a9ad00eb0f32d3bfe138e46e1
parent3dd3d4ffe09b62569b187f2b0efb88dbfc1eddaf (diff)
downloadhorizon-858d4790cfc6cc3d6155e960ef4f7cae3c87bd73.tar.gz
fix(swift): allow object creation
It is currently not possible to create any new objects inside Swift as you'd always get an error that the new object name already exists all the time. This fixes that issue and enables you to upload files again. Closes-Bug: #1993005 Related-Change-Id: Idfb90a327e94ccaa3263aaaad1d6d52fa46312f4 Change-Id: Ib2f1aaae87820e8d5c4a6c9b01b6a6e9a5552952 (cherry picked from commit a327842a25f904397be0c3c141ada1f9ac8050cd)
-rw-r--r--openstack_dashboard/static/app/core/openstack-service-api/swift.service.js3
-rw-r--r--openstack_dashboard/static/app/core/openstack-service-api/swift.service.spec.js1
2 files changed, 1 insertions, 3 deletions
diff --git a/openstack_dashboard/static/app/core/openstack-service-api/swift.service.js b/openstack_dashboard/static/app/core/openstack-service-api/swift.service.js
index b2b170efe..daafd8ead 100644
--- a/openstack_dashboard/static/app/core/openstack-service-api/swift.service.js
+++ b/openstack_dashboard/static/app/core/openstack-service-api/swift.service.js
@@ -296,8 +296,7 @@
service.getObjectURL(container, objectName, 'metadata')
);
if (ignoreError) {
- // provide a noop error handler so the error is ignored
- return promise.catch(angular.noop);
+ return promise;
}
return promise.catch(function onError() {
toastService.add('error', gettext('Unable to get details of the object.'));
diff --git a/openstack_dashboard/static/app/core/openstack-service-api/swift.service.spec.js b/openstack_dashboard/static/app/core/openstack-service-api/swift.service.spec.js
index 40ec0002d..06a64908d 100644
--- a/openstack_dashboard/static/app/core/openstack-service-api/swift.service.spec.js
+++ b/openstack_dashboard/static/app/core/openstack-service-api/swift.service.spec.js
@@ -256,7 +256,6 @@
spyOn(promise, 'catch');
spyOn(toastService, 'add');
service.getObjectDetails('spam', 'ham', true);
- expect(promise.catch).toHaveBeenCalledWith(angular.noop);
expect(toastService.add).not.toHaveBeenCalled();
});