Skip to content

Commit

Permalink
customer_data_app (#54)
Browse files Browse the repository at this point in the history
Fix query condition when checking if user to add already exists
  • Loading branch information
masenf authored Jan 10, 2025
1 parent 38cb133 commit e880101
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion customer_data_app/customer_data/backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def get_user(self, user: Customer):
def add_customer_to_db(self, form_data: dict):
with rx.session() as session:
if session.exec(
select(Customer).where(Customer.email == self.current_user.email)
select(Customer).where(Customer.email == form_data.get("email"))
).first():
return rx.window_alert("User with this email already exists")
self.current_user = Customer(
Expand Down

0 comments on commit e880101

Please sign in to comment.