mirror of
https://github.com/correl/codereview.git
synced 2025-04-13 17:00:03 -09:00
Fixed diff reviews being linked to a mutable parent ref rather than a commit id
This commit is contained in:
parent
bd2d939fb0
commit
26d7eb381e
1 changed files with 3 additions and 1 deletions
|
@ -22,7 +22,9 @@ def new(request):
|
|||
else:
|
||||
description = commit.message.split('\n')[0].strip()
|
||||
if form.cleaned_data['parent']:
|
||||
parent = form.cleaned_data['parent']
|
||||
# Ensure we store the actual commit id for the supplied parent ref
|
||||
parent = repo.commit(form.cleaned_data['parent'])
|
||||
parent = parent.id
|
||||
else:
|
||||
parent = commit.parents[0] if commit.parents else None
|
||||
review = Review.objects.create(
|
||||
|
|
Loading…
Add table
Reference in a new issue