File tree 2 files changed +5
-4
lines changed
lib/MusicBrainz/Server/Edit
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ sub build_display_data
116
116
$data -> {ended }{new } = boolean_to_json($data -> {ended }{new });
117
117
}
118
118
119
- if (exists $self -> data-> {new }{type }) {
119
+ if (exists $self -> data-> {new }{type_id }) {
120
120
$data -> {type }{old } = to_json_object($data -> {type }{old });
121
121
$data -> {type }{new } = to_json_object($data -> {type }{new });
122
122
}
Original file line number Diff line number Diff line change @@ -131,14 +131,16 @@ sub build_display_data {
131
131
132
132
my %data ;
133
133
134
- $data { release } = to_json_object (
134
+ my $ release = (
135
135
$loaded -> {Release }{ $self -> data-> {entity }{id } } ||
136
136
Release-> new( name => $self -> data-> {entity }{name } )
137
137
);
138
138
139
+ $data {release } = to_json_object($release );
140
+
139
141
$data {artwork } = to_json_object(
140
142
$loaded -> {Artwork }{ $self -> data-> {id } } ||
141
- Artwork-> new(release => $data { release } ,
143
+ Artwork-> new(release => $release ,
142
144
id => $self -> data-> {id },
143
145
comment => $self -> data-> {new }{comment } // ' ' ,
144
146
cover_art_types => [ map {
@@ -147,7 +149,6 @@ sub build_display_data {
147
149
)
148
150
);
149
151
150
-
151
152
if ($self -> data-> {old }{types })
152
153
{
153
154
$data {types } = {
You can’t perform that action at this time.
0 commit comments