Skip to content

Commit a13a40b

Browse files
authored
Merge pull request #2101 from dmach/fix/git-obs-pr-dump-null-in-timeline
Fix crash in 'git-obs pr dump' when timeline contains a null entry
2 parents d6aac5c + ad74d83 commit a13a40b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

osc/gitea_api/issue_timeline_entry.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
class IssueTimelineEntry(GiteaModel):
1212
def __init__(self, *args, **kwargs):
13+
if args and args[0] is None:
14+
# gitea sometimes returns `null` instead of a timeline entry, this prevents a crash
15+
args = [{}] + list(args[1:])
1316
super().__init__(*args, **kwargs)
1417
self._pull_request_review_cache = None
1518

0 commit comments

Comments
 (0)