( # type: ignore[no-untyped-def,override]
self,
delete_orphan_organisations: bool = DEFAULT_DELETE_ORPHAN_ORGANISATIONS_VALUE,
)
| 177 | ).annotate(users_count=Count("users")).filter(users_count=1).delete() |
| 178 | |
| 179 | def delete( # type: ignore[no-untyped-def,override] |
| 180 | self, |
| 181 | delete_orphan_organisations: bool = DEFAULT_DELETE_ORPHAN_ORGANISATIONS_VALUE, |
| 182 | ): |
| 183 | if delete_orphan_organisations: |
| 184 | self.delete_orphan_organisations() |
| 185 | super().delete() |
| 186 | |
| 187 | def set_password(self, raw_password): # type: ignore[no-untyped-def] |
| 188 | super().set_password(raw_password) |