area17 / twill

Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
https://twillcms.com
Apache License 2.0
3.72k stars 568 forks source link

Fix: error when updating a model after having enabled a new language in the config #2487

Closed Tofandel closed 6 months ago

Tofandel commented 6 months ago

Description

If you create a model, then add a new language in the translatable config and try to save this save model you will get an error Cannot set property 'active' on null because it's trying to get a translation that doesn't yet exist

This PR fixes this issue