[1.5.x] Fixed #20730 -- Fixed "Programmatically creating permissions" error.
[1.5.x] Fixed #20730 -- Fixed "Programmatically creating permissions" error.

Thanks glarrain for the report.

Backport of 684a606a4e from master

hasadna/django,alx-eu/django,alx-eu/django,ccn-2m/django,bliti/django-nonrel-1.5,hasadna/django,imtapps/django-imt-fork,hasadna/django,ccn-2m/django,alx-eu/django,alx-eu/django,bliti/django-nonrel-1.5,ccn-2m/django,imtapps/django-imt-fork,ccn-2m/django,imtapps/django-imt-fork,bliti/django-nonrel-1.5