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

Add attribute check on name attribute on base resource #1795

Merged

Conversation

alecritson
Copy link
Collaborator

Currently if the name attribute is just Text instead of TranslatedText this will fail as the panel is rendering a translated text input, causing the name value to be an array of locales.

This PR adds an additional check on the method that fetches the name input so the form data is correct on save.

@alecritson alecritson requested a review from glennjacobs May 30, 2024 10:45
Copy link

vercel bot commented May 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lunar-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2024 9:45am

@glennjacobs
Copy link
Contributor

Considering we want to move to a dedicated name field for models like Product, I don't think we want to be adding further "code smell". So closing in favour of moving to the dedicated name field ASAP.

@glennjacobs glennjacobs reopened this Jul 18, 2024
@glennjacobs
Copy link
Contributor

@alecritson as we've decided not to make the name change in v1, I've reopened this PR.

@glennjacobs
Copy link
Contributor

@alecritson will we also need this for Collection editing etc, or does it only affect Products?

@alecritson
Copy link
Collaborator Author

@alecritson will we also need this for Collection editing etc, or does it only affect Products?

It's already handled on the collection page.

@alecritson alecritson merged commit b68c030 into 1.x Aug 22, 2024
23 checks passed
@alecritson alecritson deleted the lun-85-name-input-fails-when-creating-a-product-if-name-isnt branch August 22, 2024 11:52
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

Successfully merging this pull request may close these issues.

2 participants