Skip to content

Commit 7fbf2e8

Browse files
committed
Changed the deprecated model._meta.get_all_field_names() to a supported construct.
- Legacy-Id: 12475
1 parent c312967 commit 7fbf2e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/doc/views_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def model_to_timeline_data(model, field='time', **kwargs):
3636
a JsonResponse() argument. The model must have a DateTimeField field.
3737
If the time field is named something else than 'time', the name must
3838
be supplied."""
39-
assert field in model._meta.get_all_field_names()
39+
assert field in [ f.name for f in model._meta.get_fields() ]
4040

4141
objects = ( model.objects.filter(**kwargs)
4242
.order_by('date')

0 commit comments

Comments
 (0)