Skip to content

Commit

Permalink
Fix draft docs sent as email link
Browse files Browse the repository at this point in the history
  • Loading branch information
abeverley committed Feb 5, 2024
1 parent 0bf5f6c commit 5898200
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Brass.pm
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,11 @@ any ['get', 'post'] => '/doc/download/:code' => sub {
download_ip_address => request->remote_address,
});

my $version_id = $doc->signed ? $doc->signed->id : $doc->published->id;
my $version_id = $doc->signed
? $doc->signed->id
: $doc->published
? $doc->published->id
: $doc->draft->id;
my $version = schema('doc')->resultset('Version')->find($version_id);

_send_doc($doc, $version);
Expand Down

0 comments on commit 5898200

Please sign in to comment.