Moved object and exit clearing to the destroy method instead of

the delete method.  This may change later, but for simplicity's sake,
this is how we're doing it for now.
This commit is contained in:
Michael King 2007-09-14 14:09:25 +00:00
parent 26beacb419
commit 74a3a01429

View file

@ -387,6 +387,10 @@ class Object(models.Model):
# Set the object type to GOING
self.type = 5
# Destroy any exits to and from this room, do this first
self.clear_exits()
# Clear out any objects located within the object
self.clear_objects()
self.save()
def delete(self):
@ -402,10 +406,6 @@ class Object(models.Model):
self.type = 6
self.save()
# Destroy any exits to and from this room, do this first
self.clear_exits()
# Clear out any objects located within the object
self.clear_objects()
# Clear all attributes
self.clear_all_attributes()