Remove HTML from stored data for entries
HTML will be rendered for entries derived from the plain text (at least, I think).
This commit is contained in:
parent
5060f6a97f
commit
81bad03ebd
2 changed files with 1 additions and 3 deletions
|
|
@ -12,7 +12,6 @@ class PublicationEntryModel(Base):
|
||||||
|
|
||||||
id: Mapped[int] = mapped_column(primary_key=True)
|
id: Mapped[int] = mapped_column(primary_key=True)
|
||||||
text: Mapped[str] = mapped_column(Text())
|
text: Mapped[str] = mapped_column(Text())
|
||||||
html: Mapped[str | None] = mapped_column(Text())
|
|
||||||
|
|
||||||
sequences: Mapped[list['PublicationSequenceModel']] = relationship(back_populates='entry')
|
sequences: Mapped[list['PublicationSequenceModel']] = relationship(back_populates='entry')
|
||||||
|
|
||||||
|
|
@ -56,7 +55,7 @@ class PublicationModel(Base):
|
||||||
|
|
||||||
|
|
||||||
def model_to_entry(db_pub_entry: PublicationEntryModel) -> Entry:
|
def model_to_entry(db_pub_entry: PublicationEntryModel) -> Entry:
|
||||||
return Entry(id=db_pub_entry.id, text=db_pub_entry.text, html=db_pub_entry.html)
|
return Entry(id=db_pub_entry.id, text=db_pub_entry.text)
|
||||||
|
|
||||||
|
|
||||||
def model_to_sequence(db_pub_position: PublicationSequenceModel) -> Sequence:
|
def model_to_sequence(db_pub_position: PublicationSequenceModel) -> Sequence:
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ from dataclasses import dataclass, field
|
||||||
class Entry:
|
class Entry:
|
||||||
id: int
|
id: int
|
||||||
text: str
|
text: str
|
||||||
html: str | None = None
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue