@@ -61,7 +61,7 @@ def post_save_title(instance, raw, created, **kwargs):
61
61
# Update descendants only if path changed
62
62
application_changed = False
63
63
64
- if instance .path != instance . tmp_path and not hasattr (instance , 'tmp_prevent_descendant_update' ):
64
+ if instance .path != getattr ( instance , ' tmp_path' , None ) and not hasattr (instance , 'tmp_prevent_descendant_update' ):
65
65
descendant_titles = Title .objects .filter (
66
66
page__lft__gt = instance .page .lft ,
67
67
page__rght__lt = instance .page .rght ,
@@ -77,13 +77,15 @@ def post_save_title(instance, raw, created, **kwargs):
77
77
descendant_title .save ()
78
78
79
79
if not hasattr (instance , 'tmp_prevent_descendant_update' ) and \
80
- (instance .application_urls != instance . tmp_application_urls or application_changed ):
80
+ (instance .application_urls != getattr ( instance , ' tmp_application_urls' , None ) or application_changed ):
81
81
# fire it if we have some application linked to this page or some descendant
82
82
cms_signals .application_post_changed .send (sender = Title , instance = instance )
83
83
84
84
# remove temporary attributes
85
- del (instance .tmp_path )
86
- del (instance .tmp_application_urls )
85
+ if getattr ( instance , 'tmp_path' , None ):
86
+ del (instance .tmp_path )
87
+ if getattr ( instance , 'tmp_application_urls' , None ):
88
+ del (instance .tmp_application_urls )
87
89
88
90
try :
89
91
del (instance .tmp_prevent_descendant_update )
0 commit comments