Skip to content

Commit c9b0868

Browse files
authored
customer_data_app
Fix query condition when checking if user to add already exists
1 parent 38cb133 commit c9b0868

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

customer_data_app/customer_data/backend/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def get_user(self, user: Customer):
154154
def add_customer_to_db(self, form_data: dict):
155155
with rx.session() as session:
156156
if session.exec(
157-
select(Customer).where(Customer.email == self.current_user.email)
157+
select(Customer).where(Customer.email == form_data.get("email"))
158158
).first():
159159
return rx.window_alert("User with this email already exists")
160160
self.current_user = Customer(

0 commit comments

Comments
 (0)