diff --git a/scram/route_manager/models.py b/scram/route_manager/models.py index 3a961af2..4cd2a308 100644 --- a/scram/route_manager/models.py +++ b/scram/route_manager/models.py @@ -41,7 +41,7 @@ class WebSocketMessage(models.Model): msg_type = models.CharField("The type of the message", max_length=50) msg_data = models.JSONField("The JSON payload. See also msg_data_route_field.", default=dict) msg_data_route_field = models.CharField( - "The key in the JSON payload whose value will contain the route being acted on." + "The key in the JSON payload whose value will contain the route being acted on.", max_length=25 ) def __str__(self): @@ -58,11 +58,11 @@ class WebSocketSequenceElement(models.Model): default=0, ) - VERB_CHOICES = { - "A": "Add", - "C": "Check", - "R": "Remove", - } + VERB_CHOICES = [ + ("A", "Add"), + ("C", "Check"), + ("R", "Remove"), + ] verb = models.CharField(max_length=1, choices=VERB_CHOICES) action_type = models.ForeignKey("ActionType", on_delete=models.CASCADE)