Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
Example content types needs to inherit from IResource
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodbare committed Dec 19, 2016
1 parent 4d6c1f6 commit 3cf6698
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/plone.server/plone/server/catalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_data(self, ob, iface, field_name):
real_field = field.bind(ob)
try:
value = real_field.get(ob)
json_compatible(value)
return json_compatible(value)
except AttributeError:
pass
except KeyError:
Expand All @@ -96,6 +96,7 @@ def get_data(self, ob, iface, field_name):
def __call__(self):
# For each type
values = {}

for schema in iter_schemata_for_type(self.content.portal_type):
behavior = schema(self.content)
for index_name, index_data in merged_tagged_value_dict(schema, index.key).items():
Expand Down
4 changes: 2 additions & 2 deletions src/plone.server/plone/server/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from plone.server.factory import make_app
from zope.component import getUtility
from zope.configuration.xmlconfig import include
from zope.interface import Interface
from plone.server.interfaces import IResource
from zope.security.interfaces import IInteraction
from plone.server.api.layer import IDefaultLayer
from plone.server.interfaces import IRequest
Expand Down Expand Up @@ -83,7 +83,7 @@
})


class IExample(Interface):
class IExample(IResource):

metadata('categories')

Expand Down

0 comments on commit 3cf6698

Please sign in to comment.