Fix image description field

Nothing changed when edit image description on Angularized panel.
This patch fixes it.

Change-Id: I29fb643bfa9b648ad24fcb9888c658a5a52e4bcc
Closes-Bug: #1779879
This commit is contained in:
Vladislav Kuzmin 2018-07-03 18:30:09 +04:00 committed by Akihiro Motoki
parent e45811cc52
commit 08e0f38c84
3 changed files with 8 additions and 2 deletions

View File

@ -103,7 +103,8 @@
.then(onMetadataGet);
function onMetadataGet(response) {
var updated = metadata;
var updated = metadata || Object();
updated.description = image.properties.description;
var removed = angular.copy(response.data);
angular.forEach(updated, function(value, key) {
delete removed[key];

View File

@ -19,7 +19,7 @@
describe('horizon.app.core.images.actions.edit.service', function() {
var service, $scope, $q, deferred, $timeout, updateImageDeferred;
var image = {id: 1, name: 'Original'};
var image = {id: 1, name: 'Original', properties: {description: 'bla-bla'}};
var existingMetadata = {p1: '1', p2: '2'};
var metadataService = {

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fix an error on image description field when it is changed
in the Angularized panel [:bug: `1779879`]