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

Find by id not observing content type limitation #79

Open
npetrides opened this issue Nov 14, 2021 · 0 comments
Open

Find by id not observing content type limitation #79

npetrides opened this issue Nov 14, 2021 · 0 comments

Comments

@npetrides
Copy link

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'>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant