Skip to content

Commit

Permalink
Merge branch 'hotfixes' for release 4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nflorentin committed Sep 20, 2019
2 parents 0d28ed6 + b4b3c2b commit c7abd25
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog Fab Manager

## v4.1.1 2019 september 20

- fix a bug: api/reservations#index was using user_id instead of statistic_profile_id
- fix a bug: event_service#date_range method, test on all_day was never truthy
- fix a bug: sidekiq 5 does not have delay_for method anymore, uses perform_in instead

## v4.1.0 2019 September 12

- Handling the Strong-Customer Authentication (SCA) for online payments
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ GEM
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
libv8 (3.16.14.11)
libv8 (3.16.14.19)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand Down
5 changes: 4 additions & 1 deletion app/controllers/api/reservations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ def index
if params[:reservable_id] && params[:reservable_type] && params[:user_id]
params[:user_id] = current_user.id unless current_user.admin?

@reservations = Reservation.where(params.permit(:reservable_id, :reservable_type, :user_id))
where_clause = params.permit(:reservable_id, :reservable_type).to_h
where_clause[:statistic_profile_id] = StatisticProfile.find_by!(user_id: params[:user_id])

@reservations = Reservation.where(where_clause)
elsif params[:reservable_id] && params[:reservable_type] && current_user.admin?
@reservations = Reservation.where(params.permit(:reservable_id, :reservable_type))
else
Expand Down
2 changes: 1 addition & 1 deletion app/models/project/openlab_sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Project::OpenlabSync
after_destroy :openlab_destroy, if: :openlab_sync_active?

def openlab_create
OpenlabWorker.delay_for(2.seconds).perform_async(:create, self.id) if self.published?
OpenlabWorker.perform_in(2.seconds, :create, self.id) if self.published?
end

def openlab_update
Expand Down
2 changes: 1 addition & 1 deletion app/services/event_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def self.date_range(starting, ending, all_day)
end_date = Time.zone.parse(ending[:date])
start_time = Time.parse(starting[:time]) if starting[:time]
end_time = Time.parse(ending[:time]) if ending[:time]
if all_day == 'true'
if all_day
start_at = DateTime.new(start_date.year, start_date.month, start_date.day, 0, 0, 0, start_date.zone)
end_at = DateTime.new(end_date.year, end_date.month, end_date.day, 23, 59, 59, end_date.zone)
else
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fab-manager",
"version": "4.1.0",
"version": "4.1.1",
"description": "FabManager is the FabLab management solution. It is web-based, open-source and totally free.",
"keywords": [
"fablab",
Expand Down

0 comments on commit c7abd25

Please sign in to comment.