From 84921deab3e04b4e2501f92ba5f2923e4cc2d155 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Rekucki?= Date: Wed, 2 Sep 2009 14:24:10 +0200 Subject: [PATCH] Fixed DC panel form. PersonListField was raising a TypeError. --- apps/explorer/forms.py | 2 +- apps/explorer/views.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/explorer/forms.py b/apps/explorer/forms.py index d79bc74c..4946be69 100644 --- a/apps/explorer/forms.py +++ b/apps/explorer/forms.py @@ -19,7 +19,7 @@ class PersonListField(forms.Field): super(PersonListField, self).__init__(*args, **kwargs) def _get_initial(self): - return u'\n'.join( ( unicode(person) for person in self._initial) ) + return self._initial and (u'\n'.join( ( unicode(person) for person in self._initial))) def _set_initial(self, value): if value is None: diff --git a/apps/explorer/views.py b/apps/explorer/views.py index 6754930a..1f53771e 100644 --- a/apps/explorer/views.py +++ b/apps/explorer/views.py @@ -210,10 +210,9 @@ def dceditor_panel(request, path, repo): try: doc_text = repo.get_file(path, user_branch) - document = parser.WLDocument.from_string(doc_text) form = forms.DublinCoreForm(info=document.book_info) - + print "FORM: ", form return direct_to_template(request, 'explorer/panels/dceditor.html', extra_context={ 'fpath': path, 'form': form, -- 2.20.1