X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/8c48dda3b4c5cf0ac6c2d404ae29d8ef315b4f7f..806ef92a88cc844c47e59220ada96477a4ce601a:/admin.py diff --git a/admin.py b/admin.py index ce79635..9e991d9 100644 --- a/admin.py +++ b/admin.py @@ -251,9 +251,9 @@ class PageAdmin(NodeAdmin): content = form.cleaned_data[('contentreference_container_%s' % container_name)] try: contentreference = page.contentreferences.get(name=container_name) - except: + except ContentReference.DoesNotExist: contentreference = ContentReference(name=container_name, page=page, content_type=container_content_type) - + if content == None: contentreference.content_id = None else: