Skip to content

Commit

Permalink
MBS-11802: Add mock LinkType for examples (#2181)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
reosarevok committed Aug 2, 2021
1 parent ca74d69 commit f81fa5d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/MusicBrainz/Server/Edit/Relationship/EditLinkType.pm
Expand Up @@ -181,7 +181,11 @@ sub build_display_data {
end_date => MusicBrainz::Server::Entity::PartialDate->new(
$rel->{link}{end_date}
),
type => $loaded->{LinkType}{ $self->data->{link_id} },
type => $display_data->{link_type} //
LinkType->new(
id => $self->data->{link_id},
name => $self->data->{new}{name}
),
)
)
)
Expand Down

0 comments on commit f81fa5d

Please sign in to comment.