statamic-rad-pack / runway

Eloquently manage your database models in Statamic.
https://statamic.com/addons/rad-pack/runway
MIT License
112 stars 47 forks source link

Setting `default` value on resource blueprint doesn't work when model is saved #618

Open edalzell opened 2 weeks ago

edalzell commented 2 weeks ago

Description

I have a toggle that is hidden sometimes (and therefore has null value), but I'd like it to save with false.

Steps to reproduce

  1. Add a toggle field to a resource blueprint.
  2. add matching bool field to model, with no default
  3. hide field
  4. try to save resource

Environment

Environment Application Name: Zakat Foundation of America Laravel Version: 11.25.0 PHP Version: 8.3.11 Composer Version: 2.7.7 Environment: local Debug Mode: OFF URL: zakat.test Maintenance Mode: OFF Timezone: America/Los_Angeles Locale: en

Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED

Drivers Broadcasting: null Cache: file Database: mysql Logs: stack / daily Mail: smtp Queue: redis Session: file

Livewire Livewire: v3.5.8

Statamic Addons: 13 Sites: 4 (zakat.org (EN), zakat.org (AR), zfinstitute.com (ZFI), zakat.org (TR)) Stache Watcher: Disabled Static Caching: Disabled Version: 5.27.0 PRO

Statamic Addons aryehraber/statamic-captcha: 1.13.0 edalzell/forma: 3.0.1 jacksleight/statamic-bard-mutator: 2.3.1 jacksleight/statamic-distill: 0.8.0 jonassiewertsen/statamic-livewire: 3.8.0 statamic-rad-pack/runway: 7.10.1 statamic/seo-pro: 6.1.2 transformstudios/events: 5.4.3 transformstudios/front: 3.0.1 transformstudios/github: dev-main transformstudios/neon: dev-feature/ai-updates transformstudios/review: 5.0 transformstudios/simple: 5.5.0

duncanmcclean commented 2 days ago

What does the field look like? (as YAML)

Do you have a default set?