Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PUI] infinite loop if classic frontend is disabled #8575

Closed
SchrodingersGat opened this issue Nov 27, 2024 · 2 comments · Fixed by #8614
Closed

[PUI] infinite loop if classic frontend is disabled #8575

SchrodingersGat opened this issue Nov 27, 2024 · 2 comments · Fixed by #8614
Assignees
Labels
bug Identifies a bug which needs to be addressed Platform UI Related to the React based User Interface setup Relates to the InvenTree setup / installation process
Milestone

Comments

@SchrodingersGat
Copy link
Member

Steps to Reproduce

  • Disable classic frontend (e.g. in config.yaml)
  • Navigate to admin center
  • View "plugins" table

Image

Traceback

Traceback (most recent call last):

  File "/home/inventree/dev/venv/lib/python3.11/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/dev/venv/lib/python3.11/site-packages/rest_framework/generics.py", line 199, in get
    return self.list(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/dev/venv/lib/python3.11/site-packages/rest_framework/mixins.py", line 40, in list
    page = self.paginate_queryset(queryset)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/dev/venv/lib/python3.11/site-packages/rest_framework/generics.py", line 171, in paginate_queryset
    return self.paginator.paginate_queryset(queryset, self.request, view=self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/dev/venv/lib/python3.11/site-packages/rest_framework/pagination.py", line 395, in paginate_queryset
    return list(queryset[self.offset:self.offset + self.limit])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 115, in __init__
    self.meta = {
                ^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 116, in <dictcomp>
    key: get_plugin_meta(key)
         ^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/models.py", line 108, in get_plugin_meta
    result = getattr(plugin, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 392, in settings_url
    config = self.plugin_config(force_reload=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/plugin.py", line 109, in plugin_config
    self._plugin_config = registry.get_plugin_config(self.plugin_slug())
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/inventree/src/backend/InvenTree/plugin/registry.py", line 121, in get_plugin_config
    cfg = PluginConfig.objects.filter(key=slug).first()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1057, in first
    for obj in queryset[:1]:

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 398, in __iter__
    self._fetch_all()

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/query.py", line 122, in __iter__
    obj = model_cls.from_db(
          ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/django/db/models/base.py", line 582, in from_db
    new = cls(*values)
          ^^^^^^^^^^^^

RecursionError: maximum recursion depth exceeded
@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed Platform UI Related to the React based User Interface question This is a question setup Relates to the InvenTree setup / installation process labels Nov 27, 2024
@SchrodingersGat SchrodingersGat added this to the 1.0.0 milestone Nov 27, 2024
@matmair matmair self-assigned this Nov 28, 2024
@matmair matmair removed the question This is a question label Nov 28, 2024
@turist79

This comment has been minimized.

@SchrodingersGat

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identifies a bug which needs to be addressed Platform UI Related to the React based User Interface setup Relates to the InvenTree setup / installation process
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants