From 36cbffa183bfab407bb13ff5008ea7623c660e69 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 11 Oct 2017 13:09:10 -0700 Subject: [PATCH] Fixes bug where custom fields would not store new name in custom fields table on edit --- app/Models/CustomField.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Models/CustomField.php b/app/Models/CustomField.php index 749e74ce59..d85c759775 100644 --- a/app/Models/CustomField.php +++ b/app/Models/CustomField.php @@ -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; });