master
.created_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True),
server_default=func.now(tz=pytz.timezone('Asia/Baku')),
deferred=True,
)
updated_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True),
server_default=func.now(tz=pytz.timezone('Asia/Baku')),
onupdate=func.now(tz=pytz.timezone('Asia/Baku')),
deferred=True,
)
In my code, when deferred=True in the created_at field, it is not possible to edit an instance of my model in the Admin panel.
raise orm_exc.DetachedInstanceError(
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <User at 0x7f215df6ce10> is not bound to a Session;
deferred load operation of attribute 'created_at' cannot proceed (Background on this error at: https://sqlalche.me/e/20/bhk3)
https://docs.sqlalchemy.org/en/20/errors.html#error-bhk3
No response
No response
No response
No response
Windows 10 / ptyhon 3.11 / sqladmin 0.19
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too