|
|
@@ -115,7 +115,7 @@ async def update_project_from_gsheet(
|
|
|
session: Session = Depends(deps.get_session),
|
|
|
):
|
|
|
"""Edit project name"""
|
|
|
- p = session.get(Project, project_id)
|
|
|
+ p: Project = session.get(Project, project_id)
|
|
|
if p is None:
|
|
|
raise HTTPException(status_code=404, detail="Project not found")
|
|
|
doc_id = extract_doc_uid(gsheet.sheet_url)
|
|
|
@@ -123,6 +123,8 @@ async def update_project_from_gsheet(
|
|
|
p.slots = []
|
|
|
p.sms = []
|
|
|
p.volunteers = []
|
|
|
+ p.tags = []
|
|
|
+ p.templates = []
|
|
|
# Parse the gsheets
|
|
|
try:
|
|
|
data = parseGsheet(doc_id, gsheet.satursday_date)
|
|
|
@@ -145,7 +147,7 @@ async def update_project_from_gsheet(
|
|
|
|
|
|
# Create creneau templates
|
|
|
template_map = {}
|
|
|
- tags_map = {}
|
|
|
+ tags_map = {tag.title: tag for tag in p.tags}
|
|
|
|
|
|
for _, row in data.creneauData.iterrows():
|
|
|
template = SlotTemplate(
|