singer-io / singer-io/tap-gitlab
A bug in flatten_id function
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 16
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the flatten_id function in the repository and inspect how it handles keys whose values are null. Reproduce the case described in the issue, then verify that an existing null value does not create a new item and that the resulting *_id value matches the requested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100