From 7fbf2e86092e49b2de6dc279973530cf34c86f98 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 7 Dec 2016 18:27:57 +0000 Subject: [PATCH] Changed the deprecated model._meta.get_all_field_names() to a supported construct. - Legacy-Id: 12475 --- ietf/doc/views_stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/doc/views_stats.py b/ietf/doc/views_stats.py index 38c183e67..6fa1a094b 100644 --- a/ietf/doc/views_stats.py +++ b/ietf/doc/views_stats.py @@ -36,7 +36,7 @@ def model_to_timeline_data(model, field='time', **kwargs): a JsonResponse() argument. The model must have a DateTimeField field. If the time field is named something else than 'time', the name must be supplied.""" - assert field in model._meta.get_all_field_names() + assert field in [ f.name for f in model._meta.get_fields() ] objects = ( model.objects.filter(**kwargs) .order_by('date')