[Answered ]-Object has no attribute 'get_notification_display'

1👍

The documentation says

For every field that has choices set, the object will have a get_FOO_display() method

but you don’t have any choices set for notification. In other words, you need a NOTIFICATION_CHOICES iterable of lenght two iterables in your class.

👤timgeb

1👍

 notification = models.CharField(choices=provider_type, max_length=2, default='Em')

remove the arrayfield as it is not allowing you to create and iterate one

Leave a comment