Stremaline the new patch flow
authorMagnus Hagander <magnus@hagander.net>
Sat, 24 Aug 2013 13:34:33 +0000 (15:34 +0200)
committerMagnus Hagander <magnus@hagander.net>
Sat, 24 Aug 2013 13:34:33 +0000 (15:34 +0200)
pgcommitfest/commitfest/models.py
pgcommitfest/commitfest/views.py

index 090804b10a8431f37beb661277ce11add1e2c82c..75078a0824b68cab12fc2c36a0f8fdee024d2766 100644 (file)
@@ -62,10 +62,10 @@ class Patch(models.Model, DiffableModel):
        commitfests = models.ManyToManyField(CommitFest, through='PatchOnCommitFest')
 
        # If there is a wiki page discussing this patch
-       wikilink = models.URLField(blank=True, null=True)
+       wikilink = models.URLField(blank=True, null=True, default='')
 
        # If there is a git repo about this patch
-       gitlink = models.URLField(blank=True, null=True)
+       gitlink = models.URLField(blank=True, null=True, default='')
 
        # Mailthreads are OneToMany in the other direction
        #mailthreads_set = ...
index aa9fd1ab2cd4becb7674ab1a90416a988ac81692..2066d641d71b76bc2f6148d7cefe1d9b5cbbf602 100644 (file)
@@ -166,10 +166,11 @@ def newpatch(request, cfid):
                        patch.save()
                        poc = PatchOnCommitFest(patch=patch, commitfest=cf, enterdate=datetime.now())
                        poc.save()
+                       PatchHistory(patch=patch, by=request.user, what='Created patch record').save()
                        # Now add the thread
                        try:
                                doAttachThread(cf, patch, form.cleaned_data['threadmsgid'], request.user)
-                               return HttpResponseRedirect("/%s/%s/" % (cf.id, patch.id))
+                               return HttpResponseRedirect("/%s/%s/edit/" % (cf.id, patch.id))
                        except Http404:
                                # Thread not found!
                                # This is a horrible breakage of API layers