txlyre 2 ani în urmă
părinte
comite
c19e391a9a
1 a modificat fișierele cu 1 adăugiri și 3 ștergeri
  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