1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

Fix a bug: when calling .to_json on an "avoir", there was a bug because order_number delegates on invoice which can be nil, it was causing errors in notifications rendering

This commit is contained in:
Nicolas Florentin 2023-09-29 15:26:36 +02:00
parent b35acdffaf
commit 1220e0e8fe
2 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@
- Fix a bug: minor pb (exception raised) when bot hit api/projects#search without beeing authenticated
- Fix a bug: minor pb (exception raised) when a bot or unauthenticated user hit api/auth_providers actions
- Fix a bug: when calling .to_json on an "avoir", there was a bug because order_number delegates on invoice which can be nil, it was causing errors in notifications rendering
## v6.1.1 2023 September 28

View File

@ -12,7 +12,7 @@ class Avoir < Invoice
attr_accessor :invoice_items_ids
delegate :order_number, to: :invoice
delegate :order_number, to: :invoice, allow_nil: true
def expire_subscription
user.subscription.expire