Migrate concept determinations
hypha.apply.determinations.management.commands.migrate_concept_determinations
¶
Command
¶
Bases: BaseCommand
help
class-attribute
instance-attribute
¶
STREAMFIELD_MAP
class-attribute
instance-attribute
¶
STREAMFIELD_MAP = {'field_cnr_technical': {'id': 'technical', 'type': 'value', 'key': 'safe_value'}, 'field_cnr_principles': {'id': 'principles', 'type': 'value', 'key': 'safe_value'}, 'field_cnr_sustainable': {'id': 'sustainable', 'type': 'value', 'key': 'safe_value'}, 'field_cnr_comments': {'id': 'comments', 'type': 'value', 'key': 'safe_value'}, 'field_cnsr_determination_message': {'id': 'message', 'type': 'value', 'key': 'safe_value'}}
add_arguments
¶
handle
¶
Source code in hypha/apply/determinations/management/commands/migrate_concept_determinations.py
process
¶
Source code in hypha/apply/determinations/management/commands/migrate_concept_determinations.py
get_field_value
¶
Handles the following formats: field: {(safe_)value: VALUE} field: {target_id: ID} -- Drupal ForeignKey. Reference to other node or user entities. field: {tid: ID} -- or term ID. fk to Categories field: [] field: [{value|target_id|tid: VALUE},]