openlibhums / janeway

A web-based platform for publishing journals, preprints, conference proceedings, and books
https://janeway.systems/
GNU Affero General Public License v3.0
172 stars 65 forks source link

Error when loading the News homepage plugin #2155

Closed mauromsl closed 3 years ago

mauromsl commented 3 years ago

Describe the bug

16:15:26 Traceback (most recent call last):
16:15:26   File "/vol/janeway/src/core/tests/test_app.py", line 269, in setUp
16:15:26     call_command('install_plugins')
16:15:26   File "/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 131, in call_command
16:15:26     return command.execute(*args, **defaults)
16:15:26   File "/usr/local/lib/python3.5/site-packages/django/core/management/base.py", line 330, in execute
16:15:26     output = self.handle(*args, **options)
16:15:26   File "/vol/janeway/src/utils/management/commands/install_plugins.py", line 52, in handle
16:15:26     plugin_settings.install()
16:15:26   File "/vol/janeway/src/core/homepage_elements/news/plugin_settings.py", line 48, in install
16:15:26     pretty='Number of Articles',
16:15:26 AttributeError: 'Setting' object has no attribute 'value'

Janeway version 2016-translation

To Reproduce Steps to reproduce the behavior:

  1. Run the test suite
mauromsl commented 3 years ago

Related to the above, I got this when running the upgrade script:

 File "src/core/homepage_elements/html/plugin_settings.py", line 31, in install
    models.PluginSetting.objects.get_or_create(
AttributeError: module 'utils.models' has no attribute 'PluginSetting'