Skip to content

Commit

Permalink
[fc] Repository: plone.app.discussion
Browse files Browse the repository at this point in the history
Branch: refs/heads/main
Date: 2025-01-14T08:28:42+01:00
Author: ale-rt (ale-rt) <[email protected]>
Commit: plone/plone.app.discussion@d6a3141

Revert "Do not depend on plone.api"

This reverts commit 977d3ce3b1b6ee6cd488efa4b74b659dc40d5e5e.

Files changed:
M plone/app/discussion/upgrades.py
M setup.py
D news/188.bugfix.rst
  • Loading branch information
ale-rt committed Jan 14, 2025
1 parent e7af33f commit 7d8dc30
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions last_commit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ Repository: plone.app.discussion


Branch: refs/heads/main
Date: 2025-01-14T08:27:46+01:00
Date: 2025-01-14T08:28:42+01:00
Author: ale-rt (ale-rt) <[email protected]>
Commit: https://github.com/plone/plone.app.discussion/commit/977d3ce3b1b6ee6cd488efa4b74b659dc40d5e5e
Commit: https://github.com/plone/plone.app.discussion/commit/d6a314178c8c38ffd2bef56504ece95add91a47d

Do not depend on plone.api
Revert "Do not depend on plone.api"

Refs. #188
Similar to #194
This reverts commit 977d3ce3b1b6ee6cd488efa4b74b659dc40d5e5e.

Files changed:
A news/188.bugfix.rst
M plone/app/discussion/upgrades.py
M setup.py
D news/188.bugfix.rst

b'diff --git a/news/188.bugfix.rst b/news/188.bugfix.rst\nnew file mode 100644\nindex 00000000..30f44736\n--- /dev/null\n+++ b/news/188.bugfix.rst\n@@ -0,0 +1 @@\n+Do not depend on ``plone.api``. [ale-rt]\ndiff --git a/plone/app/discussion/upgrades.py b/plone/app/discussion/upgrades.py\nindex b63a666b..cab45926 100644\n--- a/plone/app/discussion/upgrades.py\n+++ b/plone/app/discussion/upgrades.py\n@@ -1,7 +1,6 @@\n from .interfaces import IDiscussionSettings\n from .setuphandlers import add_discussion_behavior_to_default_types\n from datetime import timezone\n-from plone import api\n from plone.registry.interfaces import IRegistry\n from Products.CMFCore.utils import getToolByName\n from Products.ZCatalog.ProgressHandler import ZLogHandler\n@@ -92,7 +91,7 @@ def extend_review_workflow(context):\n \n def set_timezone_on_dates(context):\n """Ensure timezone data is stored against all creation/modified dates"""\n- pc = api.portal.get_tool("portal_catalog")\n+ pc = getToolByName(context, "portal_catalog")\n creations = 0\n modifieds = 0\n logger.info("Setting timezone information on comment dates")\ndiff --git a/setup.py b/setup.py\nindex f4c4869d..558c1c69 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -44,7 +44,6 @@\n "Products.GenericSetup",\n "Products.ZCatalog",\n "Products.statusmessages",\n- "plone.api",\n "plone.app.event",\n "plone.registry",\n "plone.resource",\n'
b'diff --git a/news/188.bugfix.rst b/news/188.bugfix.rst\ndeleted file mode 100644\nindex 30f44736..00000000\n--- a/news/188.bugfix.rst\n+++ /dev/null\n@@ -1 +0,0 @@\n-Do not depend on ``plone.api``. [ale-rt]\ndiff --git a/plone/app/discussion/upgrades.py b/plone/app/discussion/upgrades.py\nindex cab45926..b63a666b 100644\n--- a/plone/app/discussion/upgrades.py\n+++ b/plone/app/discussion/upgrades.py\n@@ -1,6 +1,7 @@\n from .interfaces import IDiscussionSettings\n from .setuphandlers import add_discussion_behavior_to_default_types\n from datetime import timezone\n+from plone import api\n from plone.registry.interfaces import IRegistry\n from Products.CMFCore.utils import getToolByName\n from Products.ZCatalog.ProgressHandler import ZLogHandler\n@@ -91,7 +92,7 @@ def extend_review_workflow(context):\n \n def set_timezone_on_dates(context):\n """Ensure timezone data is stored against all creation/modified dates"""\n- pc = getToolByName(context, "portal_catalog")\n+ pc = api.portal.get_tool("portal_catalog")\n creations = 0\n modifieds = 0\n logger.info("Setting timezone information on comment dates")\ndiff --git a/setup.py b/setup.py\nindex 558c1c69..f4c4869d 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -44,6 +44,7 @@\n "Products.GenericSetup",\n "Products.ZCatalog",\n "Products.statusmessages",\n+ "plone.api",\n "plone.app.event",\n "plone.registry",\n "plone.resource",\n'

0 comments on commit 7d8dc30

Please sign in to comment.