PollOption name disapear after user submission
This ticket is related to https://git.startinblox.com/blox/polls/issues/14
I can reproduce it on local. But the behaviour is quite strange.
When a user vote, the polloption endpoint does not serialize the name of the option used, but only for other users (the user who voted continue to show all the votes options)
{
"@context": "https://cdn.happy-dev.fr/owl/hdcontext.jsonld",
"@type": "ldp:Container",
"@id": "http://localhost:8000/polls/50/pollOptions/",
"ldp:contains": [
{
"@id": "http://localhost:8000/polloptions/246/",
"name": "À reformuler",
"permissions": [
{
"mode": {
"@type": "delete"
}
},
{
"mode": {
"@type": "add"
}
},
{
"mode": {
"@type": "view"
}
},
{
"mode": {
"@type": "change"
}
}
]
},
{
"@id": "http://localhost:8000/polloptions/247/",
"permissions": [
{
"mode": {
"@type": "delete"
}
},
{
"mode": {
"@type": "add"
}
},
{
"mode": {
"@type": "view"
}
},
{
"mode": {
"@type": "change"
}
}
]
},
{
"@id": "http://localhost:8000/polloptions/248/",
"name": "Favorable",
"permissions": [
{
"mode": {
"@type": "delete"
}
},
{
"mode": {
"@type": "add"
}
},
{
"mode": {
"@type": "view"
}
},
{
"mode": {
"@type": "change"
}
}
]
},
{
"@id": "http://localhost:8000/polloptions/249/",
"name": "Très favorable",
"permissions": [
{
"mode": {
"@type": "delete"
}
},
{
"mode": {
"@type": "add"
}
},
{
"mode": {
"@type": "view"
}
},
{
"mode": {
"@type": "change"
}
}
]
}
],
"permissions": [
{
"mode": {
"@type": "add"
}
},
{
"mode": {
"@type": "view"
}
},
{
"mode": {
"@type": "change"
}
}
]
}
If simply stop the server and rerun it, there is no change.
If i remove the 'name' from 'serialized_fields', make a request, restore the field and rerun the request the name reappear. If i change the poll option name on the django admin the name reapear to
Is there any cache mecanism that can explain that ?