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
Hello, Am using milia with my rails app. It was working pretty fine until i changed my models primary key data type to String instead of Integer.
While signup a new tenant, it's not creating new tenant and user, Instead it's raising Milia::Control::InvalidTenantAccess: no existing valid current tenant error.
I tried to figured out why this is happening, then i found this is causing while creating new tenant for first time.
Here is the code from lib/milia/base.rb
def acts_as_universal_and_determines_account()
include ::Milia::InviteMember
has_and_belongs_to_many :tenants
acts_as_universal()
# validate that a tenant exists prior to a user creation
before_create do |new_user|
if Thread.current[:tenant_id].blank? ||
!Thread.current[:tenant_id].kind_of?(Integer) ||
Thread.current[:tenant_id].zero?
raise ::Milia::Control::InvalidTenantAccess, "no existing valid current tenant"
end
end
end
Here we can see that it's checking for Integer type tenant_id. What if we would like to use some other data type instead Integer. ?? Thanks ...!
The text was updated successfully, but these errors were encountered:
Hello, Am using milia with my rails app. It was working pretty fine until i changed my models primary key data type to
String
instead ofInteger
.While signup a new tenant, it's not creating new tenant and user, Instead it's raising
Milia::Control::InvalidTenantAccess: no existing valid current tenant
error.I tried to figured out why this is happening, then i found this is causing while creating new tenant for first time.
Here is the code from
lib/milia/base.rb
Here we can see that it's checking for Integer type tenant_id. What if we would like to use some other data type instead Integer. ?? Thanks ...!
The text was updated successfully, but these errors were encountered: