django save() error

I got this got this error recently when trying to add the first entry of a model in the Admin section:


Request Method: GET
Request URL: http://mydomain/admin/escorts/escort/None/
Exception Type: ValueError
Exception Value: invalid literal for int() with base 10: 'None'

Exception Location: /lib/python2.6/site-packages/django/db/models/fields/__init__.py in get_db_prep_value, line 361
Python Executable: /usr/bin/python

Turns out I had overridden the save() function and it had worked fine. However the models.py file got corrupted and I lost the last few lines of the file including a line from my overridden save() function:

super(myModel, self).save(force_insert=True)

Tags:

One Response to “django save() error”

  1. JESUS says:


    Medicamentspot.com. Canadian Health&Care.Best quality drugs.Special Internet Prices.No prescription online pharmacy. No prescription drugs. Buy drugs online

    Buy:Female Pink Viagra.Female Cialis.Cozaar.Amoxicillin.Acomplia.Buspar.Lipitor.Lipothin.SleepWell.Wellbutrin SR.Benicar.Aricept.Zetia.Prozac.Advair.Lasix.Ventolin.Zocor.Seroquel.Nymphomax….

Leave a Reply