Closed hellsgate1001 closed 11 years ago
I'm looking at this just now and I'll issue a pull request if I manage to fix this.
Sorry, closed by mistake :(
Issue fixed and pull request issued
Ah, I think I understand what's going on here, though strangely I haven't tripped it myself. Adding a self.pk
check should solve the problem, but it may not be the best solution, given that it prevents STC from doing anything potentially helpful for you when a new instance is created (less a problem for the main mixin, but for people using TrackChanges
, it might suck a bit).
Could you add a test that breaks the current build of STC?
Fixed by #4.
While Updating an existing model instance works as expected, creating a new instance causes a DoesNotExist exception.:
Request Method: POST Request URL: http://corecrm.local/booking/dining/
Django Version: 1.5.3 Python Version: 2.7.3 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.gis', 'nested_inlines', 'django.contrib.admin', 'south', 'rest_framework', 'djcelery', 'django_extensions', 'corecrm', 'people', 'groupop', 'venue', 'tag', 'booking', 'debug_toolbar') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'audit_log.middleware.UserLoggingMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware')
Traceback: File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
Exception Type: DoesNotExist at /booking/dining/ Exception Value: