Skip to content

Commit

Permalink
fix TitleText property to return only plain text
Browse files Browse the repository at this point in the history
  • Loading branch information
thrau committed Apr 3, 2024
1 parent f7dab67 commit db8d521
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion notion_objects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from .properties import *
from .values import *

__version__ = "0.6.1"
__version__ = "0.6.2"
2 changes: 1 addition & 1 deletion notion_objects/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class TitleText(Property[str]):
def get(self, field: str, obj: dict) -> str:
items = obj["properties"][field]["title"]
if items:
return "".join([item["text"]["content"] for item in items])
return "".join([item["plain_text"] for item in items])
return ""

def set(self, field: str, value: Optional[str], obj: dict):
Expand Down

0 comments on commit db8d521

Please sign in to comment.