ok, I spot the bug. In one of these models, I have a foreign key to
Session model.
So, when I do session.flush(), on cascade deleted all the related
models.

thank you for your time.

On May 14, 3:15 pm, ekms <erikmell...@gmail.com> wrote:
> I debugged it step by step and the data dissapears from DB in the line
> of session.flush()
>
> The data are three models that I created, and instances of these
> models are saved in the form. The difference between these models and
> others saved but not deleted by flush(), is that these 3 models have
> foreign keys to User model.
>
> Later, when I arrive at home, I will post the code and models...
>
> On May 14, 4:54 am, Shawn Milochik <sh...@milochik.com> wrote:
>
> > Given that logging a user out calls flush(), I don't believe that's
> > what's deleting your data. Otherwise everyone using contrib.auth would
> > be complaining.
>
> > What data is being deleted?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to