1
0
Fork 0
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:
Correl Roush 2010-12-21 17:33:14 -05:00
parent bd2d939fb0
commit 26d7eb381e

View file

@ -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(