Skip to content

Commit

Permalink
fix: refactored sql to update project form
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujanadh committed Nov 13, 2024
1 parent 83060d5 commit 5cc44ae
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/backend/app/projects/project_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,6 @@ async def update_project_form(
Also updates the category and custom XLSForm data in the database.
"""
project = project_user_dict["project"]
user = project_user_dict["user"]

# TODO we currently do nothing with the provided category
# TODO allowing for category updates is disabled due to complexity
Expand All @@ -879,9 +878,7 @@ async def update_project_form(
sql = """
UPDATE projects
SET
xlsform_content = %(xls_data)s,
author_id = %(author_id)s,
short_description = %(text)s
xlsform_content = %(xls_data)s
WHERE
id = %(project_id)s
RETURNING id, hashtags;
Expand All @@ -891,7 +888,6 @@ async def update_project_form(
sql,
{
"xls_data": xlsform.getvalue(),
"author_id": user.id,
"project_id": project.id,
},
)
Expand Down

0 comments on commit 5cc44ae

Please sign in to comment.