Skip to content

Commit

Permalink
references: remove requests-specific helper functions
Browse files Browse the repository at this point in the history
* they were accidentally lifted up from invenio-requests, even though
  they're not really useful outside of requests
  • Loading branch information
max-moser authored and fenekku committed Jan 26, 2022
1 parent 7276be2 commit 29b02d3
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions invenio_records_resources/records/systemfields/entity_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,25 +99,3 @@ def check_allowed_references(

ref_type = list(ref_dict.keys())[0]
return ref_type in get_allowed_types(request)


check_allowed_creators = partial(
check_allowed_references,
lambda r: r.type.creator_can_be_none,
lambda r: r.type.allowed_creator_ref_types,
)
"""Check function specific for the ``created_by`` field of requests."""

check_allowed_receivers = partial(
check_allowed_references,
lambda r: r.type.receiver_can_be_none,
lambda r: r.type.allowed_receiver_ref_types,
)
"""Check function specific for the ``receiver`` field of requests."""

check_allowed_topics = partial(
check_allowed_references,
lambda r: r.type.topic_can_be_none,
lambda r: r.type.allowed_topic_ref_types,
)
"""Check function specific for the ``topic`` field of requests."""

0 comments on commit 29b02d3

Please sign in to comment.