Open roadsend opened 3 years ago
Same issue here but with any fields which can be nullable. It seems that uses the laravel Nova API used in create/edit form view, so all fields not being set and be nullable will be null allways.
Possible solution: The field should send all set values for current registry or maybe create a new api rest entry which only updates the specified model field.
Description:
When a Currency field is used and another field is used with inline-text->updateOnIndex() the value of the currency field is not set on the record when saved but is updated to null.
Detailed steps to reproduce the issue on a fresh Nova installation:
Create a test nova resource with the following fields
}
I've added updateRules('sometimes') on CPL with no changes - it isn't a required field.
If the CPL data field is not nullable it generates a MySQL error on update - if it is nullable it is set to null
In the same example if you replace Currency with Number it works normally.
If you make Currency read only it works normally.
If you try and hack it by using two fields and onlyOnForms/ExceptOnForms to make it still is updated to null.