Skip to content
Snippets Groups Projects
Commit 85a0d6cc authored by Andrea Callia D'Iddio's avatar Andrea Callia D'Iddio
Browse files

Fix: set on_behalf to null in the database if the corresponding form field is empty.

parent bb084769
No related branches found
No related tags found
No related merge requests found
Pipeline #358990 passed
......@@ -59,7 +59,7 @@ def create_project():
title=form.title.data,
description=form.description.data,
proposer=current_user.username,
on_behalf=form.on_behalf.data,
on_behalf=form.on_behalf.data if form.on_behalf.data != "" else None,
)
db.session.add(project)
db.session.commit()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment