You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
Perhaps we should allow the initializer to work with nil value as a phone number. Current behavior raises an exception "NoMethodError: undefined method `sub' for nil:NilClass". That requires a user of the model to always check if the phone number isn't nil. However, when an empty string is provided a user can call msisdn.valid? to check whether a model is valid without wondering about the reasons (invalid due to phone number being nil or because of something else)
Perhaps we should allow the initializer to work with nil value as a phone number. Current behavior raises an exception "NoMethodError: undefined method `sub' for nil:NilClass". That requires a user of the model to always check if the phone number isn't nil. However, when an empty string is provided a user can call msisdn.valid? to check whether a model is valid without wondering about the reasons (invalid due to phone number being nil or because of something else)
dovecote/app/models/dovecote/msisdn.rb
Line 208 in a5870b4
change proposition:
phone_number = phone_number.to_s.sub...(etc)
The text was updated successfully, but these errors were encountered: