txlyre 2 년 전
부모
커밋
c19e391a9a
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      actions.py

+ 1 - 3
actions.py

@@ -132,8 +132,6 @@ async def get_birthdays(peer_id):
 
 async def add_or_update_birthday(peer_id, user, date):
   birthday = await BirthDay.filter(peer_id=peer_id, user_id=user.id).first()
-  if birthday:
-    return False
 
   await BirthDay(
     peer_id=peer_id,
@@ -141,4 +139,4 @@ async def add_or_update_birthday(peer_id, user, date):
     date=date
   ).save()
 
-  return True
+  return birthday is not None