mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) unable apply a coupon if this coupon has used by an user removed
This commit is contained in:
parent
b1d0a5aad2
commit
c48956be10
@ -1,5 +1,7 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
- Fix a bug: unable apply a coupon if this coupon has used by an user removed
|
||||
|
||||
## v5.4.24 2022 October 14
|
||||
|
||||
- Fix a bug: unable debit hours of prepaid pack after a reservation of machine
|
||||
|
@ -82,7 +82,8 @@ class Coupon < ApplicationRecord
|
||||
end
|
||||
|
||||
def users
|
||||
invoices.map(&:user)
|
||||
# compact to user removed
|
||||
invoices.map(&:user).compact
|
||||
end
|
||||
|
||||
def users_ids
|
||||
@ -104,5 +105,4 @@ class Coupon < ApplicationRecord
|
||||
def delete_gateway_coupon
|
||||
PaymentGatewayService.new.delete_coupon(id)
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user