Skip to content

Commit

Permalink
Merge pull request #2 from rosiel/name_module
Browse files Browse the repository at this point in the history
Name module for taxonomy terms
  • Loading branch information
ajstanley authored Jan 14, 2025
2 parents 99d636b + fb8c20d commit 2671e8e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion workbench
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ def create():
node = link_field.create(
config, field_definitions, node, row, custom_field
)
# name fields.

# Name fields.
elif field_definitions[custom_field]["field_type"] == "name":
name_field = workbench_fields.NameField()
node = name_field.create(
Expand Down Expand Up @@ -845,6 +846,8 @@ def update():
custom_field,
node_field_values[custom_field],
)

# Name fields.
elif field_definitions[custom_field]["field_type"] == "name":
name_field = workbench_fields.NameField()
node = name_field.update(
Expand Down Expand Up @@ -3307,6 +3310,18 @@ def update_terms():
term_field_values[custom_field],
)

# Name fields.
elif field_definitions[custom_field]["field_type"] == "name":
link_field = workbench_fields.NameField()
term = link_field.update(
config,
field_definitions,
term,
row,
custom_field,
term_field_values[custom_field],
)

# For non-entity reference and non-typed relation fields (text, etc.).
else:
simple_field = workbench_fields.SimpleField()
Expand Down

0 comments on commit 2671e8e

Please sign in to comment.