'As FacilityGroup acts as a soft wrapper around FacilityUser entities, upon soft deletion
we \'evict\' the FacilityUsers rather than the default behaviour of soft deleting all the
entities that ForeignKey onto the object. As such, we completely overwrite the super
soft_delete method.'

@transaction.commit_on_success
def soft_delete(self):

    self.deleted = True
    for user in self.facilityuser_set.all():
        user.group = None
        user.save()
    self.save()
