#20748: model permissions created twice when codename has non-ASCII chars
-------------------------------------+-------------------------------------
     Reporter:  bpietro              |      Owner:  nobody
         Type:  Uncategorized        |     Status:  new
    Component:  Database layer       |    Version:  1.4
  (models, ORM)                      |   Keywords:  permission codename,
     Severity:  Normal               |  non-ASCII
 Triage Stage:  Unreviewed           |  Has patch:  0
Easy pickings:  0                    |      UI/UX:  0
-------------------------------------+-------------------------------------
 Creating some model permissions I wrongly created one with codename with
 non-ASCII char.
 syncdb created this permission without any error.
 Subsequent call of syncdb tries to create it once more, I think, becuse I
 got error

 django.db.utils.IntegrityError: duplicate key value violates unique
 constraint "auth_permission_content_type_id_key"
 DETAIL:  Key (content_type_id, codename)=(73, dati_per_contabilità)
 already exists.

 Used RDBMS PostgreSQL with psycopg2 backend
 After corrected typo all is OK, so really this non-ASCII was the guilty.

 IMHO should be better reject it in first run with "Error - only ASCII
 chars allowed in codename"

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20748>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.f0f2af8fe15a2ced139fc978f24e3743%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to