inveniosoftware / inveniosoftware/invenio-github
model: Repository.get filtering uniqueness issues
Open
Type: bug
- Dominant language
- Python
- Stars
- 8
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
[This clause in Repository.get](https://github.com/inveniosoftware/invenio-github/blob/master/invenio_github/models.py#L190-L191), might return multiple results (effectively failing because of the `.one()` call). Example:
```python
>>> cls.query.filter((Repository.github_id == 123456) | (Repository.name == 'some/repo')).all()
[,
]
```
The usual cause is that the same user deleted/renamed the old `some/repo`, and created a new one with a new name.
Contributor guide
Assessment
This issue has not been assessed yet.