fixed db-api documentation on queryset.get() method
According to documentation:
get()
raises
AssertionError
if more than one object was found
According to the Queryset.get():
if num == 1:
return clone._result_cache[0]
if not num:
raise self.model.DoesNotExist("%s matching query does not exist."
% self.model._meta.object_name)
raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"
Seems like documentation is wrong.
Change History
(5)
Triage Stage: |
Unreviewed → Design decision needed
|
Owner: |
changed from nobody to leotr
|
Status: |
new → assigned
|
Triage Stage: |
Design decision needed → Accepted
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Actually it's a bug, so i think that it should be checked in without decision of core team