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