Back to Reservations Units Support

nocio
nocio

Leaving the base price field empty yields "SQLSTATE[HY000]: General error: 1366 Incorrect decimal value: '' for column 'price' at row 1 (SQL: insert into vojtasvoboda_reservations_units (name, ident, enabled, capacity, minimum, description, price, updated_at, created_at) "

I believe the problem is that the migrations puts a decimal constraint on the field such that nullable has no effect:

$table->decimal('price', 5, 2)->nullable()->after('quantity');

I guess it would be better to move the decimal validation out of schema and put it into the model validation instead.

October build: 447 Ubuntu 18.04 Mysql

nolybom
nolybom

+1

bug hasn't been fixed in v1.1.2

Vojta Svoboda
Vojta Svoboda

Sorry for the delay. Saving empty value is fixed in 1.1.3.

1-3 of 3