diff --git a/app/models.py b/app/models.py index fe5d557f..c7c8f700 100644 --- a/app/models.py +++ b/app/models.py @@ -2971,11 +2971,7 @@ class RecoveryCode(Base, ModelMixin): @classmethod def find_by_user_code(cls, user: User, code: str): hashed_code = cls._hash_code(code) - # TODO: Only return hashed codes once there aren't unhashed codes in the db. - found_code = cls.get_by(user_id=user.id, code=hashed_code) - if found_code: - return found_code - return cls.get_by(user_id=user.id, code=code) + return cls.get_by(user_id=user.id, code=hashed_code) @classmethod def empty(cls, user):