When updating a campaign, I found that if the payload send as PUT
includes an unmodified copy of the title, it will be marked as a
validation error because there already exist a same record in the
database with this title; which is the expected behaviour because it is
the same record.
To be clear, if I create a campaign:
POST /api/campaigns => { title: "My title", description: "Desc" }
Location: /api/campaigns/1
And then update it this way:
PUT /api/campaigns/1 => { title: "My title", description: "New" }
It should not fail because I submit the same title in the payload due to
"a campaign called 'My title' already exists", because of course it
does.
When updating a campaign, I found that if the payload send as PUT includes an unmodified copy of the title, it will be marked as a validation error because there already exist a same record in the database with this title; which is the expected behaviour because it is the same record.
To be clear, if I create a campaign:
And then update it this way:
It should not fail because I submit the same title in the payload due to "a campaign called 'My title' already exists", because of course it does.