This is serious.

A customer I've been working for, claims that he had been adding data
via django admin panel (100+ or so records, and one record is really
big, using many 'inlines' each with its own formset etc. so adding 100
such records is quite an effort) and at some point of time, large part
of the data vanished. He wants us to manually type the data in to
restore what allegedly was wiped out.

He claims the data was gone after we've done the last release. We have
not backed up the DB before the release, it was last backed up 2 weeks
ago (yeah, I know, shame on us, but milk's spilled already). It is
true that during the relase I made one delete operation via the admin
panel (as part of the tidying up some stuff that he messed up earlier)
which might have cascade-delete the data in question, but I dont
remember seeing the warning about related records being deleted. But
OK, I might have overseen it. He was so certain the data was missing,
I wrote to him and admitted that it might have been my unfortunate
delete and we will type it all in again...

But then I started investigating. First I checked the 2-weeks old db
backup, to restore at least part of the data. It turns out, 2 weeks
ago the data certainly wasn't there, in fact there were less data than
it is now, after the alleged wipeout! He claims he added the data
after the db was backed up... (although I have his first email where
he says it was added throught a timespan of month...). First doubt.

So I have dumped the django admin panel log and it turned out there
were no records of adding those data!! Now, this was very strange. I
know that cascade-deletes are not recorded in the log, but if he
claims he entered 100+ items of content_type_id=13, then each such
operation should be recorded. But it wasn't!! I could identify only
about a dozen inserts (action_flag=added) for the relevant
content_type id.

So I call him and tell him I believe I am not guilty of deleting the
data and that I think it never were entered... He went angry and told
me he's 1000% sure he spent a hell lot of time entering this data, and
he even saw it later at the front-end, and that it can't be serious,
the admin loggin mechanism must be fucked up, because he surely wasn't
hallucinating when he was adding these data, etc etc. I was trying to
convince him that the logger worked ok because other operations (other
content_types) are logged correctly, there are no time gaps (in fact
there are different operations every day, proving data on other tables
added by other people matching perfectly with the current db state),
but eventually he got really pissed off and hanged up.

Then I investigated further. And... to my surprise I have found some
pieces of data on the database that i coudn't find in the
django_admin_log. WTF!? There is physically no other interface to
enter these data other than the bloody django admin panel, I am 100%
sure of this!!! I can see a piece of data in the db, but no trace of
adding it in the django_admin_log!!! Aghrrr! Some of the data of the
same content type are there, but some arent there. I am 100% sure it
must've been entered via the admin panel, but if this was the case -
why isnt there any trace in the django_admin_log? Maybe he is right
and I am wrong?

The data structure has not change since the last few months, no tables
deleted/added, nothing like this. I don't get it and I am totally
confused now.

So, the question is, can I trust the django_admin_log records? Is it
possible that it captures only some of the user actions, and some of
them might be missing? If that's true, then he might be right: he
added the data (somhow not recorded by django_admin_log???), then I
accidentally deleted it by deleting the master record....

On the other hand, the guy owes me few thousands $ for the last stage
but I know has a difficult financial situation now (the whole
financing is collapsing due to completely irresponsible behaviour of
his partner) and I suspect he MIGHT have a reason to lookf for an
excuse to break the contract and don't pay. Which is in fact a biggest
doubts of all in this situation.

I would feel so much better if I knew this wasn't my fault, but like I
said, I am a bit confused over what I found in the django_admin_log...
Imagine, you have 24 records of type X in the database, and you dump
FULL log of django_admin_panel and find out it only recorded 14 insert
operations on this table since the very beginning. And there's no
other interface for adding these data other than via the admin panel.

Help!

-- 
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