Skip to content

Instantly share code, notes, and snippets.

@ddierickx
Created November 5, 2012 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddierickx/4020212 to your computer and use it in GitHub Desktop.
Save ddierickx/4020212 to your computer and use it in GitHub Desktop.
stacktrace
File "/...//website/test.py", line 4, in <module>
o.save()
File "/...//website/store/utils.py", line 13, in save
val = self.__old_save(self, *args, **kwargs)
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/base.py", line 551, in save_base
result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 203, in _insert
return insert_query(self.model, objs, fields, **kwargs)
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 1576, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 909, in execute_sql
for sql, params in self.as_sql():
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 872, in as_sql
for obj in self.query.objs
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 292, in get_db_prep_save
prepared=False)
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 284, in get_db_prep_value
value = self.get_prep_value(value)
File "/...//venv/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 537, in get_prep_value
return int(value)
TypeError: int() argument must be a string or a number, not 'Order'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment