mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
(bug) Erroneous "cancelation failed" message if elasticsearch was disabled
This commit is contained in:
parent
f67c286497
commit
07757e6adb
@ -16,6 +16,7 @@
|
||||
- Fix a bug: Unable to change the group of a user
|
||||
- Fix a bug: As admin, unable to create a new member (#374)
|
||||
- Fix a bug: profile completion form is not shown is T&C were not filled
|
||||
- Fix a bug: Erroneous "cancelation failed" message if elasticsearch was disabled
|
||||
|
||||
## v5.4.12 2022 July 06
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
class SlotsReservationsService
|
||||
class << self
|
||||
def cancel(slot_reservation)
|
||||
# first we mark ths slot reseravtion as cancelled in DB, to free a ticket
|
||||
# first we mark ths slot reservation as cancelled in DB, to free a ticket
|
||||
slot_reservation.update_attributes(canceled_at: DateTime.current)
|
||||
|
||||
# then we try to remove this reservation from ElasticSearch, to keep the statistics up-to-date
|
||||
@ -18,6 +18,8 @@ class SlotsReservationsService
|
||||
conflicts: 'proceed',
|
||||
body: { query: { match: { reservationId: slot_reservation.reservation_id } } }
|
||||
)
|
||||
rescue Faraday::ConnectionFailed
|
||||
warn 'Unable to update data in elasticsearch'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user