1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

(fix) avoids crash if invoicing_profile has no address associated to it

This commit is contained in:
Nicolas Florentin 2023-11-24 10:40:28 +01:00
parent 0716596add
commit a946399ec5
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
## next release
- fix a bug: user was not able to reserve at the same time of an event with pre-registration invalidated
- fix a bug: avoids crash if invoicing_profile has no address associated to it
## v6.3.4 2023 November 23

View File

@ -118,7 +118,7 @@ class User < ApplicationRecord
statistic_profile.gender.nil? || profile.first_name.blank? || profile.last_name.blank? || username.blank? ||
email.blank? || encrypted_password.blank? || group_id.nil? || statistic_profile.birthday.blank? ||
(Setting.get('phone_required') && profile.phone.blank?) ||
(Setting.get('address_required') && invoicing_profile.address&.address&.blank?)
(Setting.get('address_required') && invoicing_profile&.address&.address&.blank?)
end
def self.mapping