From 4bde29ba4337e593acaf2b5b10f15cbd16fd203d Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 24 Aug 2013 15:34:33 +0200 Subject: Stremaline the new patch flow --- pgcommitfest/commitfest/models.py | 4 ++-- pgcommitfest/commitfest/views.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'pgcommitfest/commitfest') diff --git a/pgcommitfest/commitfest/models.py b/pgcommitfest/commitfest/models.py index 090804b..75078a0 100644 --- a/pgcommitfest/commitfest/models.py +++ b/pgcommitfest/commitfest/models.py @@ -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 = ... diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py index aa9fd1a..2066d64 100644 --- a/pgcommitfest/commitfest/views.py +++ b/pgcommitfest/commitfest/views.py @@ -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 -- cgit v1.2.3