Python Forum
Django REST - input of some form fields is send twice to the backend
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Django REST - input of some form fields is send twice to the backend
#1
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.
Reply
#2
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.
Reply
#3
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.
Reply
#4
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?
Reply
#5
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Selenium fields containing a word graham23s 3 2,844 Aug-22-2023, 12:35 PM
Last Post: Gaurav_Kumar
  How to Extend a serializer in Django Rest-Framework Dexty 0 1,722 Aug-10-2022, 02:53 PM
Last Post: Dexty
  Registration Form Fields rwahdan 2 1,897 Aug-09-2022, 10:35 AM
Last Post: Addweb
  Error - ManyToMany Fields in Django rob25111 0 1,526 Jan-17-2021, 04:58 PM
Last Post: rob25111
  Web app structure with python as backend alt19 1 1,959 Oct-06-2020, 11:28 PM
Last Post: scidam
  Django send email - email form Remek953 2 2,295 Sep-18-2020, 07:07 AM
Last Post: Remek953
  How to send notifications to gmail from contact form using Django and pushbullet Justchse 0 1,868 Sep-01-2020, 01:19 PM
Last Post: Justchse
  Django admin form with parent child tmmaersk 0 1,863 Apr-02-2020, 06:42 AM
Last Post: tmmaersk
  Send email to gmail after user fill up contact form and getting django database updat Man_from_India 0 2,107 Jan-22-2020, 03:59 PM
Last Post: Man_from_India
  Python for Backend Development jayarora 1 1,964 Dec-25-2019, 10:16 AM
Last Post: ralhanashwarya

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020