Team-uMigrate / umigrate

Source code for the uMigrate project
13 stars 2 forks source link

API: Deleted previous messages #392

Closed deandrebaker closed 3 years ago

deandrebaker commented 3 years ago

When a user is deleted from the database, their messages get deleted. This means that it is possible for the Message.previous_message property to refer to a deleted message, which will cause errors. Therefore, we should set this property to None if the message it refers to is about to be deleted. Look into overriding the delete method for the Message class.