Skip to content

Commit

Permalink
config: rename enabled flag
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo committed Jun 12, 2024
1 parent d5ccc64 commit 47a91bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Jobs can be managed through the administration view in the Invenio instance. By

.. code-block:: python
JOBS_ADMINISTRATION_DISABLED = False
JOBS_ADMINISTRATION_ENABLED = True
More Help
Expand Down
2 changes: 1 addition & 1 deletion invenio_jobs/administration/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class JobsListView(AdminResourceListView):
@staticmethod
def disabled():
"""Disable the view on demand."""
return current_app.config["JOBS_ADMINISTRATION_DISABLED"]
return not current_app.config["JOBS_ADMINISTRATION_ENABLED"]


class JobsDetailsView(AdminResourceListView):
Expand Down
2 changes: 1 addition & 1 deletion invenio_jobs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
JOBS_RUNS_PERMISSION_POLICY = RunPermissionPolicy
"""Permission policy for job runs."""

JOBS_ADMINISTRATION_DISABLED = True
JOBS_ADMINISTRATION_ENABLED = False
"""Disable Jobs administration views if ``True``."""

JOBS_FACETS = {}
Expand Down

0 comments on commit 47a91bd

Please sign in to comment.