diff --git a/oarepo_requests/types/ref_types.py b/oarepo_requests/types/ref_types.py index de50d992..7e702920 100644 --- a/oarepo_requests/types/ref_types.py +++ b/oarepo_requests/types/ref_types.py @@ -19,9 +19,10 @@ def __get__(self, obj, owner): for ref_type in current_oarepo_requests.requests_entity_resolvers: if not isinstance(ref_type, RecordResolver): continue - if self.published and not ref_type.record_cls.is_draft: + is_draft = getattr(ref_type.record_cls, 'is_draft', False) + if self.published and not is_draft: ret.append(ref_type.type_key) - elif self.draft and ref_type.record_cls.is_draft: + elif self.draft and is_draft: ret.append(ref_type.type_key) return ret diff --git a/setup.cfg b/setup.cfg index dab0d058..fb532e25 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = oarepo-requests -version = 1.2.1 +version = 1.2.2 description = authors = Ronald Krist readme = README.md