diff --git a/apps/api/schedule.py b/apps/api/schedule.py index 4e405c500..a09be2a6c 100644 --- a/apps/api/schedule.py +++ b/apps/api/schedule.py @@ -56,7 +56,7 @@ def patch(self, proposal_id): for attribute in ALLOWED_ATTRIBUTES: if attribute in payload: - setattr(proposal, attribute, payload[attribute] or "") + setattr(proposal, attribute, payload[attribute]) db.session.add(proposal) db.session.commit() diff --git a/tests/test_api_proposals.py b/tests/test_api_proposals.py index a88692a99..757a97faa 100644 --- a/tests/test_api_proposals.py +++ b/tests/test_api_proposals.py @@ -83,7 +83,7 @@ def test_clearing_video_url(client, app, db, proposal): assert rv.status_code == 200 proposal = Proposal.query.get(proposal.id) - assert proposal.youtube_url == "" + assert proposal.youtube_url is None def test_rejects_disallowed_attributes(client, app, proposal):