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
Describe the bug or question
In certain environments the line in the update method: model_columns = {column.name for column in inspect(self.model).c} writes over the column import for the below line: stmt = stmt.returning(*[column(name) for name in return_columns])
Description
column import being overwritten by local loop, resulting in the following error:
UnboundLocalError: cannot access local variable 'column' where it is not associated with a value
Updating the line with a new variable name fixes the issue: model_columns = {_column.name for _column in inspect(self.model).c} Screenshots ```python
The text was updated successfully, but these errors were encountered:
fastcrud/crud/fast_crud.py", line 1980, in update
stmt = stmt.returning(*[column(name) for name in return_columns])
^^^^^^
UnboundLocalError: cannot access local variable 'column' where it is not associated with a value
Describe the bug or question
In certain environments the line in the update method:
model_columns = {column.name for column in inspect(self.model).c}
writes over the column import for the below line:stmt = stmt.returning(*[column(name) for name in return_columns])
Description
column import being overwritten by local loop, resulting in the following error:
UnboundLocalError: cannot access local variable 'column' where it is not associated with a value
Updating the line with a new variable name fixes the issue:
model_columns = {_column.name for _column in inspect(self.model).c}
Screenshots
```python
The text was updated successfully, but these errors were encountered: