Skip to content

Commit

Permalink
Import HAS_PLONE_5 from imio.helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
gbastien committed Apr 4, 2024
1 parent dc1e8f5 commit ba91b07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Changelog
- Import `safe_encode` from `imio.pyutils` instead `imio.helpers`.
[gbastien]
- Use has Plone versions constants (`HAS_PLONE_4`, `HAS_PLONE_5`, ...)
from imio.helpers.
from `imio.helpers`.
[gbastien]

3.42 (2024-02-12)
Expand Down
3 changes: 2 additions & 1 deletion src/collective/documentgenerator/browser/generation_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from collective.documentgenerator.interfaces import PODTemplateNotFoundError
from collective.documentgenerator.utils import remove_tmp_file
from collective.documentgenerator.utils import temporary_file_name
from imio.helpers import HAS_PLONE_5_AND_MORE
from plone import api
from plone.app.uuid.utils import uuidToObject
from plone.i18n.normalizer.interfaces import IFileNameNormalizer
Expand Down Expand Up @@ -440,7 +441,7 @@ def redirects(self, persisted_doc):
"""
Redirects to the created document.
"""
if config.HAS_PLONE_5:
if HAS_PLONE_5_AND_MORE:
filename = persisted_doc.file.filename
else:
filename = persisted_doc.getFile().filename
Expand Down

0 comments on commit ba91b07

Please sign in to comment.