Alex Vandiver
d6745209f2
django: Use .exists() instead of .count() when possible.
2023-09-11 15:00:37 -07:00
Alex Vandiver
cdda4bc089
delete_realm: Clean up attachments when deleting or scrubbing realms.
2023-03-02 16:36:19 -08:00
Anders Kaseorg
b0e569f07c
ruff: Fix SIM102 nested `if` statements.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-23 11:18:36 -08:00
Mateusz Mandera
ebc144896f
delete_realm: Use Message.realm column for message count.
2022-10-31 09:57:42 -07:00
Anders Kaseorg
e1f42c1ac5
docs: Add missing space to compound verbs “back up”, “log in”, etc.
...
Noun: backup, login, logout, lookup, setup.
Verb: back up, log in, log out, look up, set up.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-02-07 19:20:54 -08:00
Alex Vandiver
6fe67f0143
delete_realm: Allow deletion of realms with empty customers.
...
This is effectively a step closer to what was proposed in
https://github.com/zulip/zulip/pull/18678#discussion_r644490540 when
this code was written in #18678 .
If the Customer object has neither of a Stripe id, nor any historical
plans, then there's no real billing association contained in the
existence of the Customer object, and it's safe to delete.
2021-08-02 22:29:16 -07:00
Alex Vandiver
4525543ec6
delete_realm: Disallow deletion of realms we've had billing plans with.
2021-06-03 09:38:12 -07:00
Tim Abbott
2c01354569
management: Use required kwargs in add_realm_args.
...
This makes management commands more readable, since one doesn't need
to know details of how the library works to read based code.
2021-05-10 12:30:58 -07:00
Anders Kaseorg
11741543da
python: Reformat with Black, except quotes.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-02-12 13:11:19 -08:00
Mateusz Mandera
cbeeadab16
delete_realm: Register a post_delete Realm handler.
...
By registering a post_delete handler to clear appropriate caches in a
nicer way, we can get rid of the ugly flush-memcached call in the
delete_realm command.
2020-10-30 11:43:03 -07:00
Alex Vandiver
bff503feb4
delete_realm: Add command to completely remove realms.
...
This will need some tweaking in upcoming commits.
2020-10-30 11:42:40 -07:00