Skip to content

Commit

Permalink
Use py3.11 compatible f-strings
Browse files Browse the repository at this point in the history
Remove _x. prefix from toast events.

Fix #250
  • Loading branch information
masenf committed Jul 31, 2024
1 parent 364b75d commit 7393124
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions customer_data_app/customer_data_app/backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def add_customer_to_db(self, form_data: dict):
session.add(Customer(**self.current_user))
session.commit()
self.load_entries()
return rx._x.toast.info(f"User {self.current_user["name"]} has been added.", variant="outline", position="bottom-right")
return rx.toast.info(f"User {self.current_user['name']} has been added.", variant="outline", position="bottom-right")


def update_customer_to_db(self, form_data: dict):
Expand All @@ -160,7 +160,7 @@ def update_customer_to_db(self, form_data: dict):
session.add(customer)
session.commit()
self.load_entries()
return rx._x.toast.info(f"User {self.current_user["name"]} has been modified.", variant="outline", position="bottom-right")
return rx.toast.info(f"User {self.current_user['name']} has been modified.", variant="outline", position="bottom-right")


def delete_customer(self, id: int):
Expand All @@ -170,7 +170,7 @@ def delete_customer(self, id: int):
session.delete(customer)
session.commit()
self.load_entries()
return rx._x.toast.info(f"User {customer.name} has been deleted.", variant="outline", position="bottom-right")
return rx.toast.info(f"User {customer.name} has been deleted.", variant="outline", position="bottom-right")


@rx.var
Expand Down

0 comments on commit 7393124

Please sign in to comment.