AttributeError: type object 'GroupType' has no attribute 'meta'
The following discussion from !270 (merged) should be addressed:
-
@debdolph started a discussion: (+3 comments) Strange exception at
/group/create
:Internal Server Error: /group/create Traceback (most recent call last): File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python3.7/contextlib.py", line 74, in inner return func(*args, **kwds) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/rules/contrib/views.py", line 221, in _wrapped_view return view_func(request, *args, **kwargs) File "/home/dolphi/Projects/AlekSIS/AlekSIS/aleksis/core/views.py", line 283, in edit_group return render(request, "core/edit_group.html", context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/shortcuts.py", line 19, in render content = loader.render_to_string(template_name, context, request, using=using) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/loader.py", line 62, in render_to_string return template.render(context, request) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 171, in render return self._render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/test/utils.py", line 95, in instrumented_test_render return self.nodelist.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render return compiled_parent._render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/test/utils.py", line 95, in instrumented_test_render return self.nodelist.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render result = block.nodelist.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form.py", line 142, in render return template.render(context_flatten(context)) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 171, in render return self._render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/test/utils.py", line 95, in instrumented_test_render return self.nodelist.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form.py", line 203, in render value = self.nodelist.render(context).strip() File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/defaulttags.py", line 309, in render return nodelist.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form.py", line 203, in render value = self.nodelist.render(context).strip() File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form_internal.py", line 91, in render return element.render(context, **options) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/base.py", line 53, in render return template.render(context.flatten()) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 171, in render return self._render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/test/utils.py", line 95, in instrumented_test_render return self.nodelist.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/defaulttags.py", line 209, in render nodelist.append(node.render_annotated(context)) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form_internal.py", line 91, in render return element.render(context, **options) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/base.py", line 53, in render return template.render(context.flatten()) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 171, in render return self._render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/test/utils.py", line 95, in instrumented_test_render return self.nodelist.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/defaulttags.py", line 209, in render nodelist.append(node.render_annotated(context)) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form_internal.py", line 91, in render return element.render(context, **options) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/base.py", line 229, in render return template.render(context.flatten()) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 171, in render return self._render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/test/utils.py", line 95, in instrumented_test_render return self.nodelist.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form.py", line 200, in render _render_parts(context, children) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form.py", line 31, in _render_parts value = partnode.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form.py", line 200, in render _render_parts(context, children) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form.py", line 31, in _render_parts value = partnode.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form.py", line 203, in render value = self.nodelist.render(context).strip() File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 936, in render bit = node.render_annotated(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 903, in render_annotated return self.render(context) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/defaulttags.py", line 161, in render values = self.sequence.resolve(context, ignore_failures=True) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/template/base.py", line 697, in resolve new_obj = func(obj, *arg_vals) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/material/templatetags/material_form_internal.py", line 214, in select_options for option in bound_field.field.widget.choices: File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/forms/models.py", line 1141, in __iter__ yield self.choice(obj) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/forms/models.py", line 1153, in choice return (self.field.prepare_value(obj), self.field.label_from_instance(obj)) File "/home/dolphi/Projects/AlekSIS/venv/lib/python3.7/site-packages/django/forms/models.py", line 1219, in label_from_instance return str(obj) File "/home/dolphi/Projects/AlekSIS/AlekSIS/aleksis/core/mixins.py", line 222, in __str__ return f"{self.__class__.meta.name} {self.pk}" AttributeError: type object 'GroupType' has no attribute 'meta'