Closed jasonyates closed 2 years ago
Following the tutorial and creating the ChoiceSet as a tuple results in the following error when extending via FIELD_CHOICES
AttributeError: 'tuple' object has no attribute 'extend'
The tutorial has the following
class ActionChoices(ChoiceSet): key = 'AccessListRule.action' CHOICES = ( ('permit', 'Permit', 'green'), ('deny', 'Deny', 'red'), ('reject', 'Reject (Reset)', 'orange'), )
It should be
class ActionChoices(ChoiceSet): key = 'AccessListRule.action' CHOICES = [ ('permit', 'Permit', 'green'), ('deny', 'Deny', 'red'), ('reject', 'Reject (Reset)', 'orange'), ]
Following the tutorial and creating the ChoiceSet as a tuple results in the following error when extending via FIELD_CHOICES
The tutorial has the following
It should be