refactor: remove depreciated repo call (#1370)

* ingredient parser hot fixes (float equality)

* remove `get` in favor of `get_one` & `multi_query`
This commit is contained in:
Hayden
2022-06-10 19:01:14 -08:00
committed by GitHub
parent b904b161eb
commit 932f4a72df
10 changed files with 25 additions and 44 deletions

View File

@@ -59,7 +59,7 @@ class RegistrationService:
if self.repos.users.get_by_username(registration.username):
raise HTTPException(status.HTTP_409_CONFLICT, {"message": self.t("exceptions.username-conflict-error")})
elif self.repos.users.get(registration.email, "email"):
elif self.repos.users.get_one(registration.email, "email"):
raise HTTPException(status.HTTP_409_CONFLICT, {"message": self.t("exceptions.email-conflict-error")})
self.logger.info(f"Registering user {registration.username}")