Browse Source

Fix image description field

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

Change-Id: I29fb643bfa9b648ad24fcb9888c658a5a52e4bcc
Closes-Bug: #1779879
Closes-Bug: #1777834
(cherry picked from commit 08e0f38c84)
changes/92/669592/2
Vladislav Kuzmin 1 year ago
parent
commit
ae1f4abd58

+ 2
- 1
openstack_dashboard/static/app/core/images/actions/edit.action.service.js View File

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

+ 1
- 1
openstack_dashboard/static/app/core/images/actions/edit.action.service.spec.js View File

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

+ 5
- 0
releasenotes/notes/image-description-3fc00c02f46a80c7.yaml View File

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

Loading…
Cancel
Save