Skip to content

Commit

Permalink
[BUGFIX] Added max length to rich text property
Browse files Browse the repository at this point in the history
  • Loading branch information
egordm committed Sep 2, 2021
1 parent 1aeccab commit e0f2d39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.7, 3.9 ]
python-version: [ 3.7 ]
steps:
- uses: actions/checkout@v2
- name: Use Python ${{ matrix.python-version }}
Expand Down
3 changes: 2 additions & 1 deletion notionsci/connections/notion/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,10 @@ def as_date(date: dt.datetime) -> 'Property':

@staticmethod
def as_rich_text(text: str) -> 'Property':
# Max length = 2000
return Property(
type=PropertyType.rich_text,
rich_text=[RichText.from_text(text or '')]
rich_text=[RichText.from_text((text or '')[:2000])]
)

@staticmethod
Expand Down

0 comments on commit e0f2d39

Please sign in to comment.