Python Forum

Full Version: Django REST - input of some form fields is send twice to the backend
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anybody had the same problem? Some users' inputs are sent to the backend twice.

Data are stored in JSON's object. Key-value schema doesn't trigger the problem, it happens with objects. What users action can cause this kind of problem? It doesn't happen every time, but only for some of the users.

"field": [
{
"url": "http://www.url-with-api/123",
"x": "y",
"a": "b",
"g": "k",
}

{
"url": "http:/www.url-with-api/124"
"x": "y",
"a": "b",
"g": "k",
}
]
Data are copied, but only difference is that another number in url was generated. I would be grateful if somebody could share experience with that kind of problem.
How is the url generated? The fact that they're different probably indicates that it isn't the client side that's generating extra objects.
When number is entered in field by user, than all data are occuring on backend side, inside object: url with unique number in the end, two type of data selected by user via dropdown and mentioned telephone number. The problem is that in some cases this action is duplicated. Than number in url is different. It looks like the reason is on client side, but how it is possible that extra object is generated? So far, manual testing a range of varaiants (changing inputs) didn't give an answer.
You said it only happens for certain users, but it always happens for those users. Are those users also the sort of people that double click buttons?
I presume from some reasons user fill the field once again. Because during filling data some of them are not visible, although previously entered? Is it possible? For example due to too slow ajax response?
Double click - after leaving field with number doesn't duplicate input.