try to display names outside of select
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-05 11:19:12 +01:00
parent 382c03660a
commit 865a3fa8b8

View File

@@ -78,7 +78,6 @@ class NewMedicineState(rx.State):
statement = select(Owner)
results = session.exec(statement)
owners = results.all()
print(owners)
return [owner.name for owner in owners]
def do_show_med_add_form(self):
@@ -213,6 +212,8 @@ def taken_form():
rx.divider(),
)
def just_show(x):
return rx.text(x)
@template(route="/medicine", title="Medikamente")
def medicine() -> rx.Component:
@@ -253,5 +254,6 @@ def medicine() -> rx.Component:
"Scan the Med",
),
),
rx.foreach(NewMedicineState.owners, rx.text),
on_mount=NewMedicineState.start_scan,
)