Skip to content

Commit

Permalink
Latest by author can be any type of release.
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Jun 17, 2014
1 parent 4a22c0a commit 2f7df32
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/MetaCPAN/Web/Model/API/Release.pm
Expand Up @@ -73,10 +73,7 @@ sub latest_by_author {
filtered => {
query => { match_all => {} },
filter => {
and => [
{ term => { author => uc($author) } },
{ term => { status => 'latest' } }
]
and => [ { term => { author => uc($author) } }, ]
},
}
},
Expand Down

2 comments on commit 2f7df32

@rwstauner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So now what's the difference latest_by_author and all_by_author?

Also noticed a weird side effect:
I ran this commit locally and compared it to prod:
The local one has 4 extra dists (1 of which is not-latest, the other 3 are backpanned),
and they are inserted in a bizarre position (they all start with D, but they are positioned between P and S, even after sorting the table with javascript o_O).
It must be sorting it on the href, because the view has code that says if latest, /release/$dist, else /release/$author/$release and that would put R in between P and S.

@rwstauner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured out the table sort bug and pushed a fix for it.

Please sign in to comment.