Skip to content

Commit

Permalink
Field Add Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbhosale committed Dec 9, 2016
1 parent 7a7ea22 commit 0b6d02f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Models/ModuleFields.php
Expand Up @@ -95,7 +95,7 @@ public static function createField($request)
} }
} else { } else {
$field->popup_vals = ""; $field->popup_vals = "";
} }


// Get number of Module fields // Get number of Module fields
$modulefields = ModuleFields::where('module', $module_id)->get(); $modulefields = ModuleFields::where('module', $module_id)->get();
Expand Down Expand Up @@ -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(); $field->save();


return $field->id; return $field->id;
Expand Down

0 comments on commit 0b6d02f

Please sign in to comment.