Update app.py
Browse files
app.py
CHANGED
|
@@ -41,17 +41,11 @@ def load_assignees():
|
|
| 41 |
st.error("Assignee.txt file not found!")
|
| 42 |
return assignees
|
| 43 |
|
| 44 |
-
# Initialize session state
|
| 45 |
if 'tasks' not in st.session_state:
|
| 46 |
-
st.session_state.tasks = load_tasks()
|
| 47 |
|
| 48 |
-
#
|
| 49 |
-
if 'tasks' not in st.session_state:
|
| 50 |
-
st.session_state.tasks = pd.DataFrame(columns=[
|
| 51 |
-
'Title', 'Description', 'Assignee', 'Status', 'Due Date'
|
| 52 |
-
])
|
| 53 |
-
|
| 54 |
-
# Load assignees
|
| 55 |
assignee_list = load_assignees()
|
| 56 |
|
| 57 |
# Sidebar for new tasks
|
|
|
|
| 41 |
st.error("Assignee.txt file not found!")
|
| 42 |
return assignees
|
| 43 |
|
| 44 |
+
# Initialize session state ONLY ONCE
|
| 45 |
if 'tasks' not in st.session_state:
|
| 46 |
+
st.session_state.tasks = load_tasks() # This line was duplicated before
|
| 47 |
|
| 48 |
+
# Load assignees once and reuse
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
assignee_list = load_assignees()
|
| 50 |
|
| 51 |
# Sidebar for new tasks
|