code: def restore(self, time=None):
          
          if self.deleted:
              time = time if time else self.deleted_at
              if time == self.deleted_at:
                  self.deleted = False
                  self.save()
                  return True
              else:
                  return False
          return False
docs: Undeletes the object. Returns True if undeleted, False if it was already not deleted