Changing hosted_file_link field names.
This commit is contained in:
@@ -930,6 +930,16 @@ def lookup_id_random_pop(obj_data:dict):
|
||||
log.warn('for_id_random was passed without for_type')
|
||||
obj_data.pop('for_id_random')
|
||||
|
||||
if 'link_to_type' in obj_data and 'link_to_id_random' in obj_data:
|
||||
obj_data['link_to_id'] = redis_lookup_id_random(record_id_random=obj_data.get('link_to_id_random', None), table_name=obj_data.get('link_to_type', None))
|
||||
obj_data.pop('link_to_id_random')
|
||||
#log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(obj_data)
|
||||
elif 'link_to_id_random' in obj_data:
|
||||
# In case link_to_id_random was passed without link_to_type
|
||||
log.warn('link_to_id_random was passed without link_to_type')
|
||||
obj_data.pop('link_to_id_random')
|
||||
|
||||
if 'object_type' in obj_data and 'object_id_random' in obj_data:
|
||||
obj_data['object_id'] = redis_lookup_id_random(record_id_random=obj_data.get('object_id_random', None), table_name=obj_data.get('object_type', None))
|
||||
obj_data.pop('object_id_random')
|
||||
|
||||
Reference in New Issue
Block a user