Skip to content

Find by id not observing content type limitation #79

@npetrides

Description

@npetrides

I'm seeing unexpected behavior when attempting to find an entry by id after already establishing the content type.

When querying my space for a "team" entity with ID = 201 no team entity should return as there is no team entity with that ID. The SDK, however, is returning a "competition" entity with ID = 201, which is definitely not expected behavior. My code is below.

--
import contentful_management

api_key = ***************
space = ****
environment = ****

client = contentful_management.Client(api_key)
space = client.spaces().find(space)
environment = space.environments().find(environment)

competitions = environment.content_types().find('competition')
teams = environment.content_types().find('team')

id = 201

team = teams.entries().find(id)

No team exists with id = 201

1 competition exists with id = 201

print(team)

Returns <Entry[competition] id='201'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions