From 9065cb663a14ab263295694426071cd42b0bb4ae Mon Sep 17 00:00:00 2001 From: bnewbold Date: Tue, 13 Mar 2007 22:38:58 -0700 Subject: hopefully fixed problem with figure knowledge items being save()-ed --- bn_django/git_wiki/models.py | 3 ++- bn_django/git_wiki/views.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'bn_django/git_wiki') diff --git a/bn_django/git_wiki/models.py b/bn_django/git_wiki/models.py index ba133b6..f320984 100644 --- a/bn_django/git_wiki/models.py +++ b/bn_django/git_wiki/models.py @@ -97,7 +97,8 @@ class Item(models.Model): self.contents = commands.getoutput(GITPREFIX + ' cat-file -p ' \ + self.id) self.size = commands.getoutput(GITPREFIX + ' cat-file -s ' + self.id) - self.save() + if not self.isfig(): + self.save() def getfile(self): import commands diff --git a/bn_django/git_wiki/views.py b/bn_django/git_wiki/views.py index 1cad5be..2bfc034 100644 --- a/bn_django/git_wiki/views.py +++ b/bn_django/git_wiki/views.py @@ -163,7 +163,6 @@ def figure(request, reqslug, blob=None, download=False): r['Content-Disposition'] = 'filename=%s' % reqslug f = i.getfile() t = f.readlines() - print "hello!" r.write(i.contents) return r -- cgit v1.2.3