Fix an attribute naming issue in crudkit. SQLAlchemy reserves the name "metadata."

This commit is contained in:
Yaro Kasear 2025-09-04 08:47:31 -05:00
parent ba7428d926
commit c72417e5e4
2 changed files with 2 additions and 2 deletions

View file

@ -23,4 +23,4 @@ class Version(Base):
timestamp = Column(DateTime, default=func.now())
actor = Column(String, nullable=True)
metadata = Column(JSON, nullable=True)
meta = Column('metadata', JSON, nullable=True)

View file

@ -98,7 +98,7 @@ class CRUDService(Generic[T]):
change_type=change_type,
data=data,
actor=str(actor) if actor else None,
metadata=metadata
meta=metadata
)
self.session.add(version)
self.session.commit()