Skip to content

Commit 79fbb9d

Browse files
committed
Fix broken direction constant use
54462c4 moved these to Constants.pm, but I believe I forgot to update this file during a rebase.
1 parent 03a3640 commit 79fbb9d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/MusicBrainz/Server/Entity/RelationshipLinkTypeGroup.pm

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package MusicBrainz::Server::Entity::RelationshipLinkTypeGroup;
22

33
use Moose;
4+
use MusicBrainz::Server::Constants qw( :direction );
45
use MusicBrainz::Server::Data::Utils qw( boolean_to_json );
56
use MusicBrainz::Server::Entity::Types;
67
use MusicBrainz::Server::Entity::Util::JSON qw( add_linked_entity );
@@ -60,9 +61,7 @@ sub TO_JSON {
6061
my ($self) = @_;
6162

6263
my $link_type_id = $self->link_type_id + 0;
63-
my $direction =
64-
($self->direction == $MusicBrainz::Server::Entity::Relationship::DIRECTION_BACKWARD)
65-
? 'backward' : 'forward';
64+
my $direction = $self->direction == $DIRECTION_BACKWARD ? 'backward' : 'forward';
6665
my $is_loaded = boolean_to_json($self->is_loaded);
6766
my $total_relationships = $self->total_relationships + 0;
6867
my $limit = $self->limit + 0;

0 commit comments

Comments
 (0)