[2.1.x] Refs #28462 -- Fixed 'invalid escape sequence' warning on Python 3.6+.
Backport of e9bd1a3e12
from master
This commit is contained in:
parent
60aa235f43
commit
38bdac4752
|
@ -1636,7 +1636,7 @@ class ModelAdmin(BaseModelAdmin):
|
||||||
|
|
||||||
def _get_edited_object_pks(self, request, prefix):
|
def _get_edited_object_pks(self, request, prefix):
|
||||||
"""Return POST data values of list_editable primary keys."""
|
"""Return POST data values of list_editable primary keys."""
|
||||||
pk_pattern = re.compile('{}-\d+-{}$'.format(prefix, self.model._meta.pk.name))
|
pk_pattern = re.compile(r'{}-\d+-{}$'.format(prefix, self.model._meta.pk.name))
|
||||||
return [value for key, value in request.POST.items() if pk_pattern.match(key)]
|
return [value for key, value in request.POST.items() if pk_pattern.match(key)]
|
||||||
|
|
||||||
def _get_list_editable_queryset(self, request, prefix):
|
def _get_list_editable_queryset(self, request, prefix):
|
||||||
|
|
Loading…
Reference in New Issue