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 find a loggical issue at crud/_sqlalchemy.py/114 :
pk_name: str = "id" # Primary key name
parser: TableModelParser = None # Table model parser
def __init__(self, model: Type[TableModelT] = None, fields: List[SqlaField] = None) -> None:
self.model = model or self.model
assert self.model, "model is None"
assert hasattr(self.model, "__table__"), "model must be has __table__ attribute."
self.pk_name: str = self.pk_name or self.model.__table__.primary_key.columns.keys()[0]
the right thing to do is to change self.pk_name: str = self.pk_name or self.model.__table__.primary_key.columns.keys()[0] to self.pk_name: str = self.model.__table__.primary_key.columns.keys()[0] or self.pk_name :
pk_name: str = "id" # Primary key name
parser: TableModelParser = None # Table model parser
def __init__(self, model: Type[TableModelT] = None, fields: List[SqlaField] = None) -> None:
self.model = model or self.model
assert self.model, "model is None"
assert hasattr(self.model, "__table__"), "model must be has __table__ attribute."
self.pk_name: str = self.model.__table__.primary_key.columns.keys()[0] or self.pk_name
The text was updated successfully, but these errors were encountered:
i find a loggical issue at crud/_sqlalchemy.py/114 :
the right thing to do is to change
self.pk_name: str = self.pk_name or self.model.__table__.primary_key.columns.keys()[0]
toself.pk_name: str = self.model.__table__.primary_key.columns.keys()[0] or self.pk_name
:The text was updated successfully, but these errors were encountered: