|
19 | 19 |
|
20 | 20 | st.subheader("Look up a policy") |
21 | 21 |
|
22 | | -policy_id = int( |
23 | | - st.text_input("Enter a policy ID", "1", key="policy_lookup_text") |
24 | | -) |
25 | | -country_id = st.text_input( |
26 | | - "Enter a country ID", "uk", key="policy_lookup_country" |
27 | | -) |
| 22 | +policy_id = int(st.text_input("Enter a policy ID", "1", key="policy_lookup_text")) |
| 23 | +country_id = st.text_input("Enter a country ID", "uk", key="policy_lookup_country") |
28 | 24 | if st.button("Look up policy", key="policy_lookup"): |
29 | 25 | try: |
30 | 26 | results = database.query( |
|
40 | 36 |
|
41 | 37 | policy_id = int(st.text_input("Enter a policy ID", "1")) |
42 | 38 | country_id = st.text_input("Enter a country ID", "uk") |
43 | | -new_label = st.text_input( |
44 | | - "Enter a new label", "New label", key="policy_label_text" |
45 | | -) |
| 39 | +new_label = st.text_input("Enter a new label", "New label", key="policy_label_text") |
46 | 40 | if st.button("Set policy label", key="policy_label"): |
47 | 41 | try: |
48 | 42 | database.set_policy_label(policy_id, country_id, new_label) |
|
54 | 48 |
|
55 | 49 | st.subheader("Delete a policy") |
56 | 50 |
|
57 | | -policy_id = int( |
58 | | - st.text_input("Enter a policy ID", "1", key="policy_delete_text") |
59 | | -) |
60 | | -country_id = st.text_input( |
61 | | - "Enter a country ID", "uk", key="policy_delete_country" |
62 | | -) |
| 51 | +policy_id = int(st.text_input("Enter a policy ID", "1", key="policy_delete_text")) |
| 52 | +country_id = st.text_input("Enter a country ID", "uk", key="policy_delete_country") |
63 | 53 | if st.button("Delete policy", key="policy_delete"): |
64 | 54 | try: |
65 | 55 | database.delete_policy(policy_id, country_id) |
|
0 commit comments