Permalink
Browse files

Field Add Bug fix

  • Loading branch information...
1 parent 7a7ea22 commit 0b6d02fe60d93c44acf632765f822eb638b4d02d @gdbhosale gdbhosale committed Dec 9, 2016
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/Models/ModuleFields.php
@@ -95,7 +95,7 @@ public static function createField($request)
}
} else {
$field->popup_vals = "";
- }
+ }
// Get number of Module fields
$modulefields = ModuleFields::where('module', $module_id)->get();
@@ -125,6 +125,14 @@ public static function createField($request)
});
}
}
+ unset($field->module_obj);
+
+ // field_type conversion to integer
+ if(is_string($field->field_type)) {
+ $ftypes = ModuleFieldTypes::getFTypes();
+ $field->field_type = $ftypes[$field->field_type];
+ }
+
$field->save();
return $field->id;

0 comments on commit 0b6d02f

Please sign in to comment.