Had to fix a bug in flask App built by 3 ppl !
So I some how roughly figured out the code and was trying to fix.
The bug was
I click on submit, two times the record was entered into database.
(Second time, duplicate error).

So to figure out ,I just commented the code which inserts to DB!

Now only one record is inserted!
I still don't know where it's actually inserting !, And IDC , problem fixed

Shall I boast about my skills!?😂

  • 2
    lol. Reminds me of a bug I fixed once in an iOS app. We were fetching a list of ‘recently viewed’ from the web api and storing them in CoreData. The problem was if you opened a Patient record after viewing that screen, the document structure was all messed up, docs appearing in the wrong folders etc.
    The cause? somehow saving the recent patients was overwriting and corrupting the existing record for that patient.
    The solution? Delete the code that saves the recent patients result to the DB. There was basically no need to do it, since if the user was offline, they couldnt view that screen anyway, or open any patient they hadnt saved earlier.
    Problem solved.
  • 1
    You Sir. You are a Hacker.
  • 1
    We should make commenting DB acess as a new debugging method!

Your Job Suck?
Get a Better Job
Add Comment