BUG FIX: Unicode migration breaks django.contrib.admin.views.main.quote
Reported by: |
Wang Chun <wangchun@…> |
Owned by: |
nobody |
Component:
|
contrib.admin
|
Version:
|
dev
|
Severity:
|
|
Keywords:
|
|
Cc:
|
|
Triage Stage:
|
Accepted
|
Has patch:
|
yes
|
Needs documentation:
|
no
|
Needs tests:
|
yes
|
Patch needs improvement:
|
no
|
Easy pickings:
|
no
|
UI/UX:
|
no
|
This affects django.contrib.admin.views.main.ChangeList.url_for_result:
def url_for_result(self, result):
return "%s/" % quote(getattr(result, self.pk_attname))
Which no longer works after the Unicode migration, because getattr now returns unicode instead of str.
If someone use a string as a primary key, and the string contains "_[0-9A-Fa-f]{2}", the record will not be editable in admin interface.
Change History
(7)
Needs tests: |
set
|
Triage Stage: |
Unreviewed → Accepted
|
milestone: |
→ 1.0
|
Resolution: |
→ worksforme
|
Status: |
new → closed
|
Resolution: |
worksforme
|
Status: |
closed → reopened
|
Resolution: |
→ fixed
|
Status: |
reopened → closed
|
Would a regression test be appropriate/necessary here?