Hey all! I run into a problem related to this discussion.
Somehow, someway, I'm getting multiple entries in my data model where I should only ever have one. I suspect it's related to the users hitting the back button or double- clicking a submit button (or something). But it baffles me how it's happening. I even have special code in there to catch duplicate attempts, but they are still getting through. If anyone has any ideas, I'm all ears. The result, however, is everywhere I have Foo.objects.get(field = x), I have to be a paranoid programmer and change them all to Foo.objects.filter(field = x) ... otherwise I get 500 errors in places where it should never happen. I'm going to have to deal with this, so here's what I'm thinking: some sort of helper function that will do a filter() but act as a .get() in that it only returns 1, but in the event more than 1 comes back notify the admin that the integrity of the database has been compromised. Alternatively, I may need to research if there is a way to put a constraint on the database that prevents duplication in the tables and raises an exception at "insert" time. Has anyone else run into this problem? If so, how are you dealing with it? Thx in advance, Sandy --- Play a murder mystery at http://www.MyDarkSecret.com --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---