Skip to content

Commit

Permalink
🚑 fix: keyErrorが起きる可能性がある部分を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Dec 8, 2022
1 parent 66beedb commit cf4cd6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mipac/models/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ def created_at(self) -> datetime:

@property
def content(self) -> str | None:
return self.__note['text']
return self.__note.get('text')

@property
def cw(self) -> str | None:
return self.__note['cw']
return self.__note.get('cw')

@property
def user_id(self) -> str:
Expand Down

0 comments on commit cf4cd6d

Please sign in to comment.