We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
use list markup for lists of elements
Part of the BITV-Test: "1.3.1b HTML-Strukturelemente für Listen"
----
- [x] list of blueprints
- [x] list of projects

unsure:
- [ ] list of questions in poll contents
- [ ] list of choices in poll contents 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `apps/contrib/templatetags/contrib_tags.py`
Content:
```
1 from django import template
2 from django.template.loader import render_to_string
3 
4 register = template.Library()
5 
6 
7 @register.assignment_tag
8 def include_template_string(template, **kwargs):
9     rendered_template = render_to_string(template, kwargs)
10     return str(rendered_template)
11 
12 
13 @register.assignment_tag
14 def combined_url_parameter(request_query_dict, **kwargs):
15     combined_query_dict = request_query_dict.copy()
16     for key in kwargs:
17         combined_query_dict.setlist(key, [kwargs[key]])
18     encoded_parameter = '?' + combined_query_dict.urlencode()
19     return encoded_parameter
20 
21 
22 @register.assignment_tag
23 def filter_has_perm(perm, user, objects):
24     """Filter a list of objects based on user permissions."""
25     if not hasattr(user, 'has_perm'):
26         # If the swapped user model does not support permissions, all objects
27         # will be returned. This is taken from rules.templatetags.has_perm.
28         return objects
29     else:
30         return (obj for obj in objects if user.has_perm(perm, obj))
31
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/apps/contrib/templatetags/contrib_tags.py b/apps/contrib/templatetags/contrib_tags.py
--- a/apps/contrib/templatetags/contrib_tags.py
+++ b/apps/contrib/templatetags/contrib_tags.py
@@ -27,4 +27,4 @@
         # will be returned. This is taken from rules.templatetags.has_perm.
         return objects
     else:
-        return (obj for obj in objects if user.has_perm(perm, obj))
+        return [obj for obj in objects if user.has_perm(perm, obj)]

{"golden_diff": "diff --git a/apps/contrib/templatetags/contrib_tags.py b/apps/contrib/templatetags/contrib_tags.py\n--- a/apps/contrib/templatetags/contrib_tags.py\n+++ b/apps/contrib/templatetags/contrib_tags.py\n@@ -27,4 +27,4 @@\n         # will be returned. This is taken from rules.templatetags.has_perm.\n         return objects\n     else:\n-        return (obj for obj in objects if user.has_perm(perm, obj))\n+        return [obj for obj in objects if user.has_perm(perm, obj)]\n", "issue": "use list markup for lists of elements\nPart of the BITV-Test: \"1.3.1b HTML-Strukturelemente f\u00fcr Listen\"\r\n----\r\n- [x] list of blueprints\r\n- [x] list of projects\r\n\r\nunsure:\r\n- [ ] list of questions in poll contents\r\n- [ ] list of choices in poll contents \n", "before_files": [{"content": "from django import template\nfrom django.template.loader import render_to_string\n\nregister = template.Library()\n\n\n@register.assignment_tag\ndef include_template_string(template, **kwargs):\n    rendered_template = render_to_string(template, kwargs)\n    return str(rendered_template)\n\n\n@register.assignment_tag\ndef combined_url_parameter(request_query_dict, **kwargs):\n    combined_query_dict = request_query_dict.copy()\n    for key in kwargs:\n        combined_query_dict.setlist(key, [kwargs[key]])\n    encoded_parameter = '?' + combined_query_dict.urlencode()\n    return encoded_parameter\n\n\n@register.assignment_tag\ndef filter_has_perm(perm, user, objects):\n    \"\"\"Filter a list of objects based on user permissions.\"\"\"\n    if not hasattr(user, 'has_perm'):\n        # If the swapped user model does not support permissions, all objects\n        # will be returned. This is taken from rules.templatetags.has_perm.\n        return objects\n    else:\n        return (obj for obj in objects if user.has_perm(perm, obj))\n", "path": "apps/contrib/templatetags/contrib_tags.py"}], "after_files": [{"content": "from django import template\nfrom django.template.loader import render_to_string\n\nregister = template.Library()\n\n\n@register.assignment_tag\ndef include_template_string(template, **kwargs):\n    rendered_template = render_to_string(template, kwargs)\n    return str(rendered_template)\n\n\n@register.assignment_tag\ndef combined_url_parameter(request_query_dict, **kwargs):\n    combined_query_dict = request_query_dict.copy()\n    for key in kwargs:\n        combined_query_dict.setlist(key, [kwargs[key]])\n    encoded_parameter = '?' + combined_query_dict.urlencode()\n    return encoded_parameter\n\n\n@register.assignment_tag\ndef filter_has_perm(perm, user, objects):\n    \"\"\"Filter a list of objects based on user permissions.\"\"\"\n    if not hasattr(user, 'has_perm'):\n        # If the swapped user model does not support permissions, all objects\n        # will be returned. This is taken from rules.templatetags.has_perm.\n        return objects\n    else:\n        return [obj for obj in objects if user.has_perm(perm, obj)]\n", "path": "apps/contrib/templatetags/contrib_tags.py"}]}