Suggestion: set_current_request_details.rb to skip subdomains if request.subdomains empty
I do not have access to https://gitlab.com/gorails/jumpstart-pro yet so submitting suggestion here:
In
Instead, perhaps change line 24 to:
In
set_current_request_details.rb
there is a test for Jumpstart::Multitenancy.subdomain?
and if that's set then it assumes request.subdomains
will always have a value. But it might not, and there might be 1+ Accounts that do not yet have a subdomain configured, in which case Account.find_by(subdomain: request.subdomains.first)
becomes Account.find_by(subdomain: nil)
which will return the first Acccount without a subdomain.Instead, perhaps change line 24 to:
if Jumpstart::Multitenancy.subdomain? && request.subdomains.size > 0 Current.account ||= Account.find_by(subdomain: request.subdomains.first) end
Notifications
You’re not receiving notifications from this thread.