Re: ValueError: save() prohibited to prevent data loss due to unsaved related object

2015-10-21 Thread Mike Dewhirst
env\xxfx3\lib\site-packages\django\db\models\query.py", line 348, in create    obj.save(force_insert=True, using=self.db)   File "C:\Users\mike\env\xxfx3\ssds\substance\models\wrappedsds.py", line 60, in save    super(Wrapped_Sds, self).save(*args, **kwargs

Re: ValueError: save() prohibited to prevent data loss due to unsaved related object

2015-10-20 Thread Tim Graham
eate > return self._create_object_from_params(lookup, params) >File > "C:\Users\mike\env\xxfx3\lib\site-packages\django\db\models\query.py", > line 439, in _create_object_from_params > obj = self.create(**params) >File > "C:\Users\mike\env\

Re: ValueError: save() prohibited to prevent data loss due to unsaved related object

2015-10-20 Thread Mike Dewhirst
\mike\env\xxfx3\lib\site-packages\django\db\models\query.py", line 348, in create obj.save(force_insert=True, using=self.db) File "C:\Users\mike\env\xxfx3\ssds\substance\models\wrappedsds.py", line 60, in save super(Wrapped_Sds, self).save(*args, **kwargs)

Re: ValueError: save() prohibited to prevent data loss due to unsaved related object

2015-10-18 Thread Mike Dewhirst
On 18/10/2015 6:28 AM, Tim Graham wrote: Do you have code that worked before (didn't result in data loss) but doesn't work now? If so, it could be a bug in Django. Yes indeed. It is all in my repo. I'll go back to 1.7.x and rerun the tests and report back. Thanks Mike On Friday, October

Re: ValueError: save() prohibited to prevent data loss due to unsaved related object

2015-10-17 Thread Tim Graham
Do you have code that worked before (didn't result in data loss) but doesn't work now? If so, it could be a bug in Django. On Friday, October 16, 2015 at 8:30:07 PM UTC-4, Mike Dewhirst wrote: > > I think I understand this error and I like what it does. My question is > ... > > What is the

ValueError: save() prohibited to prevent data loss due to unsaved related object

2015-10-16 Thread Mike Dewhirst
I think I understand this error and I like what it does. My question is ... What is the necessary coding paradigm when you have all sorts of m:1, 1:m and m:m relationships and need to create those objects when they don't exist when saving a new central object? I'm moving from 1.7.x to 1.8.5