[1.6.x] Fixed #12579 -- Noted QuerySet.get_or_create() depends on database unique constraints.
[1.6.x] Fixed #12579 -- Noted QuerySet.get_or_create() depends on database unique constraints.

Thanks timmolendijk, jdunck, vijay_shanker, and loic84.

Backport of 428de2e339 from master.

felixjimenez/django,felixjimenez/django,dex4er/django,felixjimenez/django,dex4er/django,django-nonrel/django,redhat-openstack/django,django-nonrel/django,redhat-openstack/django,felixjimenez/django,dex4er/django,redhat-openstack/django,redhat-openstack/django,django-nonrel/django,django-nonrel/django