Fixes bug where custom fields would not store new name in custom fields table on edit

This commit is contained in:
snipe 2017-10-11 13:09:10 -07:00
parent b6a1e0d12f
commit 36cbffa183

View file

@ -62,9 +62,16 @@ class CustomField extends Model
return true;
}
return Schema::table(CustomField::$table_name, function ($table) use ($custom_field) {
Schema::table(CustomField::$table_name, function ($table) use ($custom_field) {
$table->renameColumn($custom_field->convertUnicodeDbSlug($custom_field->getOriginal("name")), $custom_field->convertUnicodeDbSlug());
});
$custom_field->db_column = $custom_field->convertUnicodeDbSlug();
$custom_field->save();
return true;
}
return true;
});