Fixes #12; 500 error when re/un assigning slot presentations

This commit is contained in:
David Ray 2014-08-11 16:33:23 -04:00
parent 5b853f9300
commit 2f6930ae11

View file

@ -77,9 +77,10 @@ class Slot(models.Model):
"""
Unassign the associated content with this slot.
"""
if self.content and self.content.slot_id:
self.content.slot = None
self.content.save()
content = self.content
if content and content.slot_id:
content.slot = None
content.save()
@property
def content(self):