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
This commit is contained in:
parent
d4b73ed1c4
commit
a327842a25
@ -296,8 +296,7 @@
|
|||||||
service.getObjectURL(container, objectName, 'metadata')
|
service.getObjectURL(container, objectName, 'metadata')
|
||||||
);
|
);
|
||||||
if (ignoreError) {
|
if (ignoreError) {
|
||||||
// provide a noop error handler so the error is ignored
|
return promise;
|
||||||
return promise.catch(angular.noop);
|
|
||||||
}
|
}
|
||||||
return promise.catch(function onError() {
|
return promise.catch(function onError() {
|
||||||
toastService.add('error', gettext('Unable to get details of the object.'));
|
toastService.add('error', gettext('Unable to get details of the object.'));
|
||||||
|
@ -256,7 +256,6 @@
|
|||||||
spyOn(promise, 'catch');
|
spyOn(promise, 'catch');
|
||||||
spyOn(toastService, 'add');
|
spyOn(toastService, 'add');
|
||||||
service.getObjectDetails('spam', 'ham', true);
|
service.getObjectDetails('spam', 'ham', true);
|
||||||
expect(promise.catch).toHaveBeenCalledWith(angular.noop);
|
|
||||||
expect(toastService.add).not.toHaveBeenCalled();
|
expect(toastService.add).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user