Skip to content

Commit

Permalink
feat!: group_changes plugin is adapted to CKAN v2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Jan 8, 2025
1 parent 0da6d0f commit 0895a62
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ckanext/toolbelt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.26"
__version__ = "0.5.0"
7 changes: 2 additions & 5 deletions ckanext/toolbelt/plugins/group_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import ckan.plugins as p
import ckan.plugins.toolkit as tk
from ckan import model
from ckan.views.group import _replace_group_org, set_org

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -219,7 +218,6 @@ def changes(id: str) -> str:
item.
"""
group_type = "group"
set_org(False)
extra_vars = {}
activity_id = id
context = {
Expand Down Expand Up @@ -260,7 +258,7 @@ def changes(id: str) -> str:
"group_type": current_group_dict["type"],
}

return tk.render(_replace_group_org("group/changes.html"), extra_vars)
return tk.render("group/changes.html", extra_vars)


@toolbelt.route("/group_type/changes_multiple", endpoint="changes_multiple")
Expand All @@ -272,7 +270,6 @@ def changes_multiple() -> str:
re-renders changes.html with the list.
"""
group_type = "group"
set_org(False)
extra_vars = {}
new_id = tk.h.get_request_param("new_id")
old_id = tk.h.get_request_param("old_id")
Expand Down Expand Up @@ -351,4 +348,4 @@ def changes_multiple() -> str:
"group_type": current_group_dict["type"],
}

return tk.render(_replace_group_org("group/changes.html"), extra_vars)
return tk.render("group/changes.html", extra_vars)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "ckanext-toolbelt"
description = ""
classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14",]
keywords = [ "CKAN",]
requires-python = ">= 3.7"
requires-python = ">= 3.8"
dependencies = [ "click", "aiosmtpd", "typing_extensions", "gitpython", "cookiecutter"]
dynamic = [ "version",]
authors = [
Expand Down

0 comments on commit 0895a62

Please sign in to comment.