Merge "Drop readonly image metadata properties from request"
This commit is contained in:
commit
5663e0865b
@ -47,6 +47,8 @@
|
||||
getResourceTypes: getResourceTypes
|
||||
};
|
||||
|
||||
var READONLY_PROPERTIES = ['os_hash_algo', 'os_hash_value'];
|
||||
|
||||
return service;
|
||||
|
||||
///////////////
|
||||
@ -278,6 +280,10 @@
|
||||
* @returns {Object} The result of the API call
|
||||
*/
|
||||
function editImageProps(id, updated, removed) {
|
||||
angular.forEach(READONLY_PROPERTIES, function(key) {
|
||||
delete updated[key];
|
||||
});
|
||||
|
||||
return apiService.patch(
|
||||
'/api/glance/images/' + id + '/properties/',
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user