Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Fix projects#index not working properly during season transition #1152

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ before_install:
- sudo apt-get install chromium-chromedriver
- gem update --system
- gem --version
- gem install bundler
- gem install bundler -v 1.17.3
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
Expand Down
8 changes: 4 additions & 4 deletions app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ def edit
end

def index
season = Season.find_by(name: params['filter']) || Season.current
@projects = if season.current? and !season.active?
Project.in_current_season.not_rejected
season = Season.find_by(name: params['filter'])
@projects = if season&.started? || !Season.current.transition?
Project.selected(season: season || Season.current)
else
Project.selected(season: season)
Project.in_current_season.not_rejected
end
end

Expand Down