I have a query where I used exception:
try:
sm = Something.objects.get(id=5)
except Something.DoesNotExist:
pass
Here what does pass do ? I mean what if my whole view depends on sm and it does not get sm . Should I set "sm" manually like:
except Something.DoesNotExist:
sm = anything
I just want to know what do pass do if it dont find whats queried. If it just ignore the part after except and go further then whats the point because my whole view depends on sm
Thank you