zulip/zerver
Pragati Agrawal 1562ec758e org settings: Use 'forever' value instead of -1 for message_retention_days.
Currently, we use -1 as the Realm.message_retention_days value to retain
message forever unless specified at stream level for a particular stream,
that is, no policy set at the realm level. But this is incoherent with what
we use for Stream.message_retention_days where -1 means

> disable retention policy for this stream unconditionally

that can be confusing from an API standpoint.

So instead of trying some hack to reset the value to NULL or using some
other value like -2 for RETAIN_MESSAGE_FOREVER and use that for API. It is
much more intuitive to use a string like 'forever' that can be mapped to
RETAIN_MESSAGE_FOREVER at the backend. And this is similar to what we use
for streams settings as well.
2020-06-24 10:38:58 -07:00
..
data_import mypy: Type simple generators as Iterator, not Iterable. 2020-06-23 11:29:54 -07:00
lib org settings: Use 'forever' value instead of -1 for message_retention_days. 2020-06-24 10:38:58 -07:00
management mypy: Type simple generators as Iterator, not Iterable. 2020-06-23 11:29:54 -07:00
migrations retention: Replace Realm.message_retention_days None value with -1. 2020-06-24 10:33:21 -07:00
openapi js_examples: Migrate and test update_message example. 2020-06-23 14:42:03 -07:00
templatetags openapi: Parse {!api-admin-only.md!} in OpenAPI markdown extension. 2020-06-19 11:04:46 -07:00
tests org settings: Use 'forever' value instead of -1 for message_retention_days. 2020-06-24 10:38:58 -07:00
tornado get_events_backend: Validate narrow type correctly. 2020-06-20 22:29:15 -07:00
views org settings: Use 'forever' value instead of -1 for message_retention_days. 2020-06-24 10:38:58 -07:00
webhooks papertrail: Replace custom validator with check_dict. 2020-06-20 22:29:15 -07:00
worker queue_processors: Avoid unchecked casts. 2020-06-22 17:18:19 -07:00
__init__.py
apps.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
context_processors.py auth: Make apple log in and sign up buttons consistent with others. 2020-06-18 13:06:10 -07:00
decorator.py decorator: Fix type of signature-changing decorators. 2020-06-23 11:29:54 -07:00
filters.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
forms.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
logging_handlers.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
middleware.py python: Manually convert more percent-formatting to f-strings. 2020-06-14 23:27:22 -07:00
models.py org settings: Use 'forever' value instead of -1 for message_retention_days. 2020-06-24 10:38:58 -07:00
signals.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00