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
When I'm using Joined Table Inheritance by specifying __mapper_args__ in my model, I get the following error calling model_form() on my model:
AttributeError: Neither 'Label' object nor 'Comparator' object has an attribute 'nullable'
I can get around this by making the following change to model_fields():
field_args = field_args or {}
properties = []
for prop in mapper.attrs.values():
+ if getattr(prop, "_is_polymorphic_discriminator", False):+ continue
if getattr(prop, "columns", None):
if exclude_fk and prop.columns[0].foreign_keys:
continue
I don't have deep enough knowledge of sqlalchemy to know if there is a better field I should be checking. If this looks right, I'm happy to open a PR.
The text was updated successfully, but these errors were encountered:
When I'm using Joined Table Inheritance by specifying
__mapper_args__
in my model, I get the following error callingmodel_form()
on my model:I can get around this by making the following change to
model_fields()
:I don't have deep enough knowledge of sqlalchemy to know if there is a better field I should be checking. If this looks right, I'm happy to open a PR.
The text was updated successfully, but these errors were encountered: