Skip to content

Embedded Asset in rich text field is not localized when using locale's wildcard #71

@mark-mishyn

Description

@mark-mishyn

When I'm requesting Entry or building it with ResourceBuilder().build() I'm facing strange behavior -- embedded assets are not localized.

During debugging I've checked raw API response and I see correct asset's URLs are there, but seems like there is some sort of a bug.

Complete example how to reproduce the bug is bellow.

def foo():
    client = contentful.Client(
        "xyz",
        "xyz",
        default_locale="en-US",
        api_url="preview.contentful.com",
    )
    entry = client.entry('qwerty12345', {"locale": "*"})

    # here rich text field contains Portuguese text, but embedded Asset is for default language (en-US)
    rich_text_field = entry.fields(locale='pt')['text']

Client version is contentful==1.13.1

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