SarathkumarJ / snapboard

Automatically exported from code.google.com/p/snapboard
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Syncdb fails on Post class in models.py. #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Running revision 88 of snapboard with django revision 4434.  Running under
postgresql version 8.0.3.

When I run syncdb on the examplesite, I get a traceback and error out. 
This is just after creating the super user and saying yes to the test data.
 Exception is:

thread  0 created
user = None
None <type 'NoneType'>
Traceback (most recent call last):
  File "manage.py", line 11, in ?
    execute_manager(settings)
  File "/usr/local/lib/python2.4/site-packages/django/core/management.py",
line 1447, in execute_manager
    execute_from_command_line(action_mapping, argv)
  File "/usr/local/lib/python2.4/site-packages/django/core/management.py",
line 1355, in execute_from_command_line
    action_mapping[action](int(options.verbosity), options.interactive)
  File "/usr/local/lib/python2.4/site-packages/django/core/management.py",
line 508, in syncdb
    verbosity=verbosity, interactive=interactive)
  File
"/usr/local/lib/python2.4/site-packages/django/dispatch/dispatcher.py",
line 347, in send
    sender=sender,
  File
"/usr/local/lib/python2.4/site-packages/django/dispatch/robustapply.py",
line 47, in robustApply
    return receiver(*arguments, **named)
  File
"/usr/home/jpittman/snapboard/examplesite/../examplesite/snapboard/management.py
",
line 75, in test_setup
    post.save()
  File
"/usr/home/jpittman/snapboard/examplesite/../examplesite/snapboard/models.py",
line 109, in save
    super(Post, self).save()
  File "/usr/local/lib/python2.4/site-packages/django/db/models/base.py",
line 204, in save
    ','.join(placeholders)), db_values)
  File "/usr/local/lib/python2.4/site-packages/django/db/backends/util.py",
line 12, in execute
    return self.cursor.execute(sql, params)
psycopg2.IntegrityError: null value in column "ip" violates not-null constraint

Workaround:  Changing this statement in the Post class:

ip = models.IPAddressField(blank=True)

To:

ip = models.IPAddressField(blank=True, null=True)

Not a fix but it gets me testing.  ;)

Original issue reported on code.google.com by johnnie....@gmail.com on 6 Feb 2007 at 10:49

GoogleCodeExporter commented 8 years ago
checked in fixes to trunk, please confirm

Original comment by bs1...@gmail.com on 7 Feb 2007 at 1:10

GoogleCodeExporter commented 8 years ago
Fixed in revision 89.  

Original comment by johnnie....@gmail.com on 7 Feb 2007 at 1:25

GoogleCodeExporter commented 8 years ago

Original comment by johnnie....@gmail.com on 21 Feb 2007 at 12:55

GoogleCodeExporter commented 8 years ago
Can't recreate on my setup.  Details?

Original comment by bs1...@gmail.com on 21 Feb 2007 at 3:25