Server Error when editing community roles
Reported by @ErinBecker at `/workshops/person/<id>/edit/#communityroles` and `/communityroles/role/<another id>/edit/` in production.

Reproduced on test AMY:
```
TypeError at /communityroles/role/25/edit/
the JSON object must be str, bytes or bytearray, not list
Error during template rendering
In template /webapps/test-amy.carpentries.org/repo/amy/templates/bootstrap4/field.html, error at line 39

{% crispy_field field %}
```

Also encountered locally when creating a community role and immediately editing it:
```
Exception Value: | 'NoneType' object is not iterable
/home/eli/amy/amy/communityroles/fields.py, line 20, in get_context

```
diff --git a/amy/communityroles/fields.py b/amy/communityroles/fields.py
index 0a459e46..6ea1cf49 100644
--- a/amy/communityroles/fields.py
+++ b/amy/communityroles/fields.py
@@ -63,7 +63,7 @@ class CustomKeysWidget(forms.TextInput):
             values = data.getlist(name)
         except AttributeError:
             values = data.get(name, [])
-        return list(zip(self.labels, values))
+        return json.dumps(list(zip(self.labels, values)))
 
     def value_omitted_from_data(
         self, data: QueryDict, files: MultiValueDict, name: str
diff --git a/amy/communityroles/tests/test_community_role_views.py b/amy/communityroles/tests/test_community_role_views.py
index b74f46ee..ea7546e5 100644
--- a/amy/communityroles/tests/test_community_role_views.py
+++ b/amy/communityroles/tests/test_community_role_views.py
@@ -119,6 +119,26 @@ class TestCommunityRoleUpdateView(TestCommunityRoleMixin, TestBase):
         self.assertEqual(page.status_code, 302)  # should redirect to new object
         self.assertRedirects(page, redirect)
 
+    def test_invalid_form_data_returns_page_with_error(self):
+        """
+        Regression test for issue #2336.
+        """
+        # Arrange
+        url = reverse("communityrole_edit", args=[self.community_role.pk])
+        data = self.data.copy()
+        data.pop(
+            "communityrole-award"
+        )  # creates a validation error as link_to_award is True
+
+        # Act
+        page = self.client.post(url, data)
+
+        # Assert
+        self.assertIn(
+            "Award is required with community role Test Role",
+            page.content.decode("utf-8"),
+        )
+
 
 class TestCommunityRoleDeleteView(TestCommunityRoleMixin, TestBase):
     def setUp(self):
['amy/communityroles/tests/test_community_role_views.py', 'amy/communityroles/fields.py']