From 4ba206ca6306755bc1916c5535a0cbb235fa1a33 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 10 Oct 2016 20:43:32 -0400 Subject: [PATCH] Removed unused contrib.admin.utils.remove_trailing_data_field(). Unused since 8f30556329b64005d63b66859a74752a0b261315. --- django/contrib/admin/utils.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/django/contrib/admin/utils.py b/django/contrib/admin/utils.py index 8e41c9979b..6b5b05e3b2 100644 --- a/django/contrib/admin/utils.py +++ b/django/contrib/admin/utils.py @@ -502,15 +502,6 @@ def get_fields_from_path(model, path): return fields -def remove_trailing_data_field(fields): - """ Discard trailing non-relation field if extant. """ - try: - get_model_from_relation(fields[-1]) - except NotRelationField: - fields = fields[:-1] - return fields - - def construct_change_message(form, formsets, add): """ Construct a JSON structure describing changes from a changed object.