You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The judgement is not correct, sometime if the key is exist but value is null, a new item will be created. I suggest the next codes: def flatten_id(item, target): if target in item: if item[target] is not None: item[target + '_id'] = item.pop(target, {}).pop('id', None) return else: item.pop(target, {}) item[target + '_id'] = None
The text was updated successfully, but these errors were encountered:
The judgement is not correct, sometime if the key is exist but value is null, a new item will be created. I suggest the next codes:
def flatten_id(item, target): if target in item: if item[target] is not None: item[target + '_id'] = item.pop(target, {}).pop('id', None) return else: item.pop(target, {}) item[target + '_id'] = None
The text was updated successfully, but these errors were encountered: