txlyre 2 éve
szülő
commit
c19e391a9a
1 módosított fájl, 1 hozzáadás és 3 törlés
  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