Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sehepunkte import: Allow write on read #179

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/recensio/plone/browser/sehepunkte.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
from itertools import chain
from plone import api
from plone.app.textfield.value import RichTextValue
from plone.protect.interfaces import IDisableCSRFProtection
from Products.CMFCore.utils import getToolByName
from Products.Five.browser import BrowserView
from recensio.plone.sehepunkte import sehepunkte_parser
from recensio.plone.tools import convertToString
from z3c.relationfield.relation import RelationValue
from zope.component import getUtility
from zope.event import notify
from zope.interface import alsoProvides
from zope.intid.interfaces import IIntIds
from zope.lifecycleevent import ObjectModifiedEvent
from zope.schema.interfaces import IVocabularyFactory
Expand Down Expand Up @@ -126,6 +128,8 @@ def __call__(self):
total,
total and review_count / total or review_count,
)
if review_count > 0:
alsoProvides(self.request, IDisableCSRFProtection)
return "Success"

def _getTargetURLs(self):
Expand Down
Loading