zulip/zerver
Greg Price c80802ff1e bots: Clean up create_realm_internal_bots.
This code duplicated the code in setup_realm_internal_bots, with some
added logic to avoid trying to create the same bot twice.  That logic
was buggy so that it would never work at all -- it subtracted a set of
UserProfile objects from a set of email strings -- so it looked like
the command might blow up when run after the users already existed.

In fact, the buggy logic wasn't necessary, because the work the
command does after it is idempotent -- in particular `create_users`,
within its subroutine `bulk_create_users`, already filters out users
that already exist.  So just cut the buggy stuff out, deduplicate the
rest with `setup_realm_internal_bots`, and document that invariant on
the latter.

While we're here, in the common case bail early without doing any
per-realm work in Python, since we're running this on every upgrade.
2018-02-06 18:59:57 -08:00
..
fixtures slack importer: Change 'restricted_to_domain' to False. 2018-02-05 14:46:39 -08:00
lib bots: Clean up create_realm_internal_bots. 2018-02-06 18:59:57 -08:00
management bots: Clean up create_realm_internal_bots. 2018-02-06 18:59:57 -08:00
migrations migrations: Fix mypy error in placeholder migration. 2018-02-05 18:03:07 -08:00
templatetags api/render-message: Make code examples and fixtures testable. 2018-01-31 07:30:54 -05:00
tests notifications: Add test for realm_name_in_notifications setting. 2018-02-07 05:09:46 +05:30
tornado zerver/tornado: Remove u prefix from strings. 2018-02-05 12:11:33 -08:00
views marketing: Update integration count. 2018-02-06 08:50:41 -08:00
webhooks integrations: Add Insping integration. 2018-01-31 14:36:54 -08:00
worker zerver/worker: Remove u prefix from strings. 2018-02-05 12:12:58 -08:00
__init__.py
apps.py zerver: Use Python 3 syntax for typing. 2017-11-28 16:49:36 -08:00
context_processors.py integrations/email: Render settings.EMAIL_GATEWAY_EXAMPLE correctly. 2018-01-22 18:05:20 -05:00
decorator.py decorators: Fix email check in access_user_by_api_key case insensitive. 2018-01-23 10:04:03 -08:00
filters.py zerver: Use Python 3 syntax for typing. 2017-11-28 16:49:36 -08:00
forms.py django-2.0: Pass string to reverse. 2018-01-31 12:07:36 -08:00
logging_handlers.py Fix mypy error in AdminNotifyHandler.emit(). 2017-12-22 15:02:18 -05:00
middleware.py mypy: Use Python 3 type syntax in zerver/middleware.py. 2017-12-11 18:43:24 -08:00
models.py settings: Added setting to turn on and off realm name in email subject. 2018-02-05 18:01:54 -08:00
signals.py emails: Fix notify_new_login emails have unserializable context. 2017-12-22 16:34:18 -05:00
static_header.txt
storage.py mypy: Improve typing for ManifestStaticFilesStorage monkeypatch. 2017-12-08 19:00:18 -08:00