1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

Merge branch 'dev' for release 5.4.9

This commit is contained in:
Du Peng 2022-06-29 20:00:41 +02:00
commit ed5157d951
3 changed files with 7 additions and 3 deletions

View File

@ -2,6 +2,10 @@
## next deploy
## v5.4.9 2022 June 29
- Fix a bug: validator of reservation can't find if slot has reserved by reservable type
## v5.4.8 2022 June 29
- My reservations dashboard

View File

@ -50,8 +50,8 @@ class CartItem::Reservation < CartItem::BaseItem
end
if availability.available_type == 'machines'
s = Slot.find_by(start_at: slot[:start_at], end_at: slot[:end_at], availability_id: slot[:availability_id], canceled_at: nil)
unless s.nil?
s = Slot.includes(:reservations).where(start_at: slot[:start_at], end_at: slot[:end_at], availability_id: slot[:availability_id], canceled_at: nil, "reservations.reservable": @reservable)
unless s.empty?
@errors[:slot] = 'slot is reserved'
return false
end

View File

@ -1,6 +1,6 @@
{
"name": "fab-manager",
"version": "5.4.8",
"version": "5.4.9",
"description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.",
"keywords": [
"fablab",