From 23bbcb464671346df23e87531a10e1bf1e332ca4 Mon Sep 17 00:00:00 2001 From: Vlad Grigorescu Date: Fri, 5 Jan 2024 17:06:31 -0600 Subject: [PATCH] Fix 2 bugs --- scram/route_manager/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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)