Skip to content

Commit f81fa5d

Browse files
authored
MBS-11802: Add mock LinkType for examples (metabrainz#2181)
While the edit itself does not require a LinkType to exist (in the case of removed link types), the examples do. This adds a mock LinkType for that purpose.
1 parent ca74d69 commit f81fa5d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/MusicBrainz/Server/Edit/Relationship/EditLinkType.pm

+5-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ sub build_display_data {
181181
end_date => MusicBrainz::Server::Entity::PartialDate->new(
182182
$rel->{link}{end_date}
183183
),
184-
type => $loaded->{LinkType}{ $self->data->{link_id} },
184+
type => $display_data->{link_type} //
185+
LinkType->new(
186+
id => $self->data->{link_id},
187+
name => $self->data->{new}{name}
188+
),
185189
)
186190
)
187191
)

0 commit comments

Comments
 (0)