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

Fix publishing of types with IShortName behaviour #57

Merged
merged 1 commit into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changelog
-------------------

- Use plone.app.uuid to resolve uuids to support plone 5 [Nachtalb]
- Fix publishing of types with IShortName behaviour [Nachtalb]


2.12.0 (2019-10-18)
Expand Down
9 changes: 9 additions & 0 deletions ftw/publisher/core/adapters/dx_field_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
import DateTime
import pkg_resources

try:
# Since plone.app.dexterity 2.1.0
from plone.app.dexterity.behaviors.id import IShortName
HAS_ISHORT = True
except ImportError:
HAS_ISHORT = False

try:
pkg_resources.get_distribution('z3c.relationfield')
Expand Down Expand Up @@ -56,6 +62,9 @@ def getData(self):
data = {}

for schemata in iterSchemata(self.context):
if HAS_ISHORT and schemata == IShortName:
continue

subdata = {}
repr = schemata(self.context)
for name, field in schema.getFieldsInOrder(schemata):
Expand Down