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
I have multi-tenancy enabled on my panel, with a model called Company as tenants.
I have a resource called Customer, with a field company_id to point to the tenant/company.
When creating a customer with the a Create page, it works seamlessly and company_id is set automatically to the current tenant.
However, when creating an Customer record with the optionCreateForm of a Select field, the company_id is not set and I get an error related to non-null constraint: null value in column "company_id" of relation "customers" violates not-null constraint
I am sure I can retrieve the tenant id and add the company_id value manually somewhere, but I thought this would be automatic.
Is what I described the desired behavior?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Package
Panel builder
Package Version
v3.2.129
How can we help you?
Hello,
I have multi-tenancy enabled on my panel, with a model called Company as tenants.
I have a resource called Customer, with a field
company_id
to point to the tenant/company.When creating a customer with the a Create page, it works seamlessly and
company_id
is set automatically to the current tenant.However, when creating an Customer record with the
optionCreateForm
of a Select field, the company_id is not set and I get an error related to non-null constraint:null value in column "company_id" of relation "customers" violates not-null constraint
Here is the code of the Select:
I am sure I can retrieve the tenant id and add the
company_id
value manually somewhere, but I thought this would be automatic.Is what I described the desired behavior?
Cheers
Beta Was this translation helpful? Give feedback.
All reactions