fix/db type 'dict' is not supported

This commit is contained in:
SouthFox 2023-03-29 02:06:52 +08:00
parent 89f1e8d6e3
commit a30bef03fa

View file

@ -61,7 +61,7 @@ class InboxObject(Base):
ap_id: Mapped[str] = Column(String, nullable=False, unique=True, index=True) # type: ignore ap_id: Mapped[str] = Column(String, nullable=False, unique=True, index=True) # type: ignore
ap_context = Column(String, nullable=True) ap_context = Column(String, nullable=True)
ap_published_at = Column(DateTime(timezone=True), nullable=False) ap_published_at = Column(DateTime(timezone=True), nullable=False)
ap_object: Mapped[dict[str, Any]] = Column(JSON, nullable=False) # type: ignore ap_object: Mapped[dict[str, Any] | None] = Column(JSON, nullable=False) # type: ignore
activity_object_ap_id = Column(String, nullable=True, index=True) activity_object_ap_id = Column(String, nullable=True, index=True)
visibility = Column(Enum(ap.VisibilityEnum), nullable=False) visibility = Column(Enum(ap.VisibilityEnum), nullable=False)