1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

(bug) if there is a reservation with a deleted user, it is not possible to delete the event

This commit is contained in:
Du Peng 2024-01-24 15:26:18 +01:00
parent ccc684e6b6
commit ba926721bb
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@
## Next release
- Fix a bug: if there is a reservation with a deleted user, it is not possible to delete the event
## v6.3.10 2024 January 19
- Fix a bug: unable to update event recurrence

View File

@ -78,7 +78,7 @@ class Slots::PlacesCacheService
# @param reservable_id [Number]
# @param user_ids [Array<Number>]
def remove_users(slot, reservable_type, reservable_id, user_ids)
return if slot.nil?
return if slot.nil? || user_ids.compact.empty?
ActiveRecord::Base.connection.execute <<-SQL.squish
with users as (