Skip to content

Commit

Permalink
Merge branch 'story-10-content-trigger' into story-11-content-and-use…
Browse files Browse the repository at this point in the history
…r-trigger
  • Loading branch information
datakurre committed Jul 10, 2018
2 parents 0d5f8d7 + cb9d181 commit 60d58f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/collective/ifttt/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from collective.ifttt.utils import Rules
from plone.app.contentrules.conditions.portaltype import PortalTypeCondition
from plone.app.contentrules.conditions.wfstate import WorkflowStateCondition
from plone.app.contentrules.conditions.wftransition import WorkflowTransitionCondition
from plone.app.contentrules.conditions.wftransition import WorkflowTransitionCondition # noqa: E501
from plone.contentrules.engine.interfaces import IRuleAssignmentManager
from plone.contentrules.engine.interfaces import IRuleStorage
from Products.CMFCore.interfaces._events import IActionSucceededEvent
Expand Down
7 changes: 1 addition & 6 deletions src/collective/ifttt/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

from Acquisition import aq_parent
from collective.ifttt import _
from plone import api
Expand All @@ -10,8 +9,6 @@
from zope.component import getMultiAdapter
from zope.component import getUtility

import os


class Rules(object):
"""Define content rule operations within collective.ifttt environment"""
Expand Down Expand Up @@ -86,9 +83,7 @@ def configure_rule(self, data):
self.rule_id = storage.values()[-1].id

# traverse to configuration page of content rule
portal = api.portal.get().__name__
rule_url = (os.sep).join(('', portal, self.rule_id))
rule = self.context.restrictedTraverse(rule_url)
rule = api.portal.get().restrictedTraverse(self.rule_id)

# add conditions to rule
self.add_condition(data, rule)
Expand Down

0 comments on commit 60d58f5

Please sign in to comment.