X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/7ea527579abe3945bc5c17063fb94387a3cc981f..c8256e579ea1a9e840619e1dade8f18353db7973:/admin.py diff --git a/admin.py b/admin.py index 506267d..1566c5b 100644 --- a/admin.py +++ b/admin.py @@ -7,7 +7,7 @@ from django.utils.translation import ugettext as _ from django.utils.safestring import mark_safe from django.utils.html import escape from django.utils.text import truncate_words -from models import * +from philo.models import * from django.core.exceptions import ValidationError, ObjectDoesNotExist from validators import TreeParentValidator, TreePositionValidator @@ -231,6 +231,8 @@ class PageAdmin(EntityAdmin): for container_name, container_content_type in contentreference_containers: if ('contentreference_container_%s' % container_name) in form.cleaned_data: content = form.cleaned_data[('contentreference_container_%s' % container_name)] + if content == None: + continue contentreference, created = page.contentreferences.get_or_create(name=container_name, defaults={'content': content}) if not created: contentreference.content = content