Skip to content

Commit

Permalink
fix: default avaibilities not use season filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Dim145 committed Mar 27, 2024
1 parent ede716f commit 0e20dc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/planning_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def add_default_to_planning
render json: "already filled or planning locked", status: :bad_request and return if planning.is_locked || exist_intervals.count > 0

# @type [Array<TimeInterval>]
default_intervals = School.first&.planning&.time_intervals&.to_a || []
default_intervals = School.first&.planning&.time_intervals&.where(start: season.start..season.end)&.to_a || []

return render json: {message: "pas de planning par défaut de saisie par l'école"}, status: :ok if default_intervals.nil?

Expand Down
2 changes: 1 addition & 1 deletion lib/elvis/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Elvis
VERSION = "2.2.7"
VERSION = "2.2.8"
end

0 comments on commit 0e20dc8

Please sign in to comment.