#Django database error
10 messages · Page 1 of 1 (latest)
If you install django-fastdev the error becomes a bit clearer as it will tell you the filters it searched for though.. so that might be useful
That's most likely doing SomeModel.objects.get(...) it expects exactly 1 result
No, then you get another exception
It even tells you how many it found (up to some cutoff), which is unusually helpful :P
That's for multiple results, for 0 I thought it was this exception
ah, sorry, I misunderstood what you said. Yes, the code is using .get(). I hope he already knew that, but that's correct, we shouldn't assume.
Write code that doesn't fail on missing data
What "what"?
We don't even know the exact problem, we only have seen a picture of an error. We supposed what general problem it probably is.
If you want more detailed help, give us more detailed story
We don't do debugging by picture, we are not 🧙♀️