|
@@ -240,11 +240,16 @@ impl CategoriesView {
|
|
|
form_data: &serde_json::Map<String, Value>,
|
|
form_data: &serde_json::Map<String, Value>,
|
|
|
) -> serde_json::Map<String, Value> {
|
|
) -> serde_json::Map<String, Value> {
|
|
|
let mut out = serde_json::Map::new();
|
|
let mut out = serde_json::Map::new();
|
|
|
|
|
+ let ignored_fields = ["parent_category_name"];
|
|
|
|
|
+
|
|
|
for (k, v) in form_data.iter() {
|
|
for (k, v) in form_data.iter() {
|
|
|
- // Skip internal editor fields
|
|
|
|
|
|
|
+ // Skip internal editor fields and ignored view-only fields
|
|
|
if k.starts_with("__editor_") {
|
|
if k.starts_with("__editor_") {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
|
|
+ if ignored_fields.contains(&k.as_str()) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if k == "parent_id" {
|
|
if k == "parent_id" {
|
|
|
// parent_id might be sent as "" for None. Convert to null.
|
|
// parent_id might be sent as "" for None. Convert to null.
|