internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: zulip/zulip

Issue:
Slack imports containing reactions from users who no longer exist throw stack
Easy to fix manually, but we shouldn't fault. Stub issue that I'll fix but don't want to forget.

```python
Traceback (most recent call last):
  File "./manage.py", line 151, in <module>
    execute_from_command_line(sys.argv)
  File "./manage.py", line 116, in execute_from_command_line
    utility.execute()
  File "/srv/zulip-venv-cache/7bce584675a91f5ea66d1f1814748fdac0d2084b/zulip-py3-venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/srv/zulip-venv-cache/7bce584675a91f5ea66d1f1814748fdac0d2084b/zulip-py3-venv/lib/python3.8/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/zulip-venv-cache/7bce584675a91f5ea66d1f1814748fdac0d2084b/zulip-py3-venv/lib/python3.8/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/home/zulip/deployments/2022-11-10-06-08-39/zerver/management/commands/convert_slack_data.py", line 59, in handle
    do_convert_data(path, output_dir, token, threads=num_threads)
  File "/home/zulip/deployments/2022-11-10-06-08-39/zerver/data_import/slack.py", line 1343, in do_convert_data
    reactions, uploads_list, zerver_attachment = convert_slack_workspace_messages(
  File "/home/zulip/deployments/2022-11-10-06-08-39/zerver/data_import/slack.py", line 750, in convert_slack_workspace_messages
    ) = channel_message_to_zerver_message(
  File "/home/zulip/deployments/2022-11-10-06-08-39/zerver/data_import/slack.py", line 914, in channel_message_to_zerver_message
    build_reactions(
  File "/home/zulip/deployments/2022-11-10-06-08-39/zerver/data_import/slack.py", line 1159, in build_reactions
    reaction_dict["user_profile"] = slack_user_id_to_zulip_user_id[slack_user_id]
KeyError: 'BLAHBLAHBLAH'
```


Discussion:
Hello @zulip/server-misc members, this issue was labeled with the "area: export/import" label, so you may want to check it out!

<!-- areaLabelAddition -->


Resolving patch:
diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py
--- a/zerver/data_import/slack.py
+++ b/zerver/data_import/slack.py
@@ -1146,6 +1146,10 @@ def build_reactions(
             continue
 
         for slack_user_id in slack_reaction["users"]:
+            if slack_user_id not in slack_user_id_to_zulip_user_id:
+                # Deleted users still have reaction references but no profile, so we skip
+                continue
+
             reaction_id = NEXT_ID("reaction")
             reaction = Reaction(
                 id=reaction_id,


Test patch:
Repository: zulip/zulip

Issue:
Inform user when scheduled message fails to send
In some cases, a scheduled message cannot be sent at the scheduled time. For example, this can happen if organization permissions have changed, and the user no longer has permissions to send the message.

In this situation, we should inform the user about what happened. Specifically, the user should receive the following message from Notification Bot:

---
The message you scheduled for [time] was not sent because of the following error:

> [error message]

[View scheduled messages](/#scheduled)


---

We also need to communicate the error in the Scheduled messages UI. We can try putting a red error icon (perhaps https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Aerror%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048) to the left of the scheduled time, with a tooltip that says:

> "Error: Your message was not sent."

[CZO discussion](https://chat.zulip.org/#narrow/stream/101-design/topic/scheduled.20message.20error.20handling/near/1565151)


Discussion:
As noted in https://github.com/zulip/zulip/pull/25440#discussion_r1189046564, we'll want to make sure we use the recipient user's language for the notification.


With #25553 now merged, what remains is just the part to display it in the #scheduled UI.

Resolving patch:
diff --git a/zerver/actions/scheduled_messages.py b/zerver/actions/scheduled_messages.py
--- a/zerver/actions/scheduled_messages.py
+++ b/zerver/actions/scheduled_messages.py
@@ -133,6 +133,17 @@ def do_schedule_messages(
     return [scheduled_message.id for scheduled_message, ignored in scheduled_messages]
 
 
+def notify_update_scheduled_message(
+    user_profile: UserProfile, scheduled_message: ScheduledMessage
+) -> None:
+    event = {
+        "type": "scheduled_messages",
+        "op": "update",
+        "scheduled_message": scheduled_message.to_dict(),
+    }
+    send_event(user_profile.realm, event, [user_profile.id])
+
+
 def edit_scheduled_message(
     scheduled_message_id: int, send_request: SendMessageRequest, sender: UserProfile
 ) -> int:
@@ -170,12 +181,7 @@ def edit_scheduled_message(
 
         scheduled_message_object.save()
 
-    event = {
-        "type": "scheduled_messages",
-        "op": "update",
-        "scheduled_message": scheduled_message_object.to_dict(),
-    }
-    send_event(sender.realm, event, [sender.id])
+    notify_update_scheduled_message(sender, scheduled_message_object)
     return scheduled_message_id
 
 
@@ -344,6 +350,7 @@ def try_deliver_one_scheduled_message(logger: logging.Logger) -> bool:
                 and not isinstance(e, RealmDeactivatedError)
                 and not isinstance(e, UserDeactivatedError)
             ):
+                notify_update_scheduled_message(scheduled_message.sender, scheduled_message)
                 send_failed_scheduled_message_notification(
                     scheduled_message.sender, scheduled_message.id
                 )


Test patch:
Repository: zulip/zulip

Issue:
Rename "Starting a new private thread" to "Starting a new direct message"
With the private messages -> direct messages migration, we should rename the "Starting a new private thread" help center article to "Starting a new direct message". The URL should be changed to /help/starting-a-new-direct-message.

We also need to update /help/getting-started-with-zulip#starting-a-new-private-thread, and any links to this article or section.


Discussion:
@drrosa would be great if you could take care of this one this week.

Resolving patch:
diff --git a/zerver/lib/url_redirects.py b/zerver/lib/url_redirects.py
--- a/zerver/lib/url_redirects.py
+++ b/zerver/lib/url_redirects.py
@@ -74,6 +74,7 @@ class URLRedirect:
     URLRedirect("/help/night-mode", "/help/dark-theme"),
     URLRedirect("/help/enable-emoticon-translations", "/help/configure-emoticon-translations"),
     URLRedirect("/help/web-public-streams", "/help/public-access-option"),
+    URLRedirect("/help/starting-a-new-private-thread", "/help/starting-a-new-direct-message"),
 ]
 
 LANDING_PAGE_REDIRECTS = [


Test patch:
Repository: zulip/zulip

Issue:
Internationalization of "Browse 1 more stream" and two more strings
<!-- Describe what you were expecting to see, what you saw instead, and steps to take in order to reproduce the buggy behavior. Screenshots can be helpful. -->
I am missing "Browse 1 more stream" https://github.com/zulip/zulip/blob/81bd63cb46273b8c94ef9e92c00893ed97110119/web/templates/subscribe_to_more_streams.hbs#L4
and "Browse # more streams" https://github.com/zulip/zulip/blob/81bd63cb46273b8c94ef9e92c00893ed97110119/web/templates/subscribe_to_more_streams.hbs#L9
in the internationalization files (translation.json or django.po).

![image](https://github.com/zulip/zulip/assets/38357406/a8049e56-0fc1-42c9-82e7-869d54d18205)

Syntax above differs from syntax in
https://github.com/zulip/zulip/blob/81bd63cb46273b8c94ef9e92c00893ed97110119/web/templates/subscribe_to_more_streams.hbs#L14
which has an entry in translation.json.

I am also missing a translation of "Direct messages" in the first column of recent conversations. May be it is generated by the following code and missing internationalization. https://github.com/zulip/zulip/blob/81bd63cb46273b8c94ef9e92c00893ed97110119/web/templates/recent_topic_row.hbs#L7

<!-- Check the box for the version of Zulip you are using (see https://zulip.com/help/view-zulip-version).-->

**Zulip Server and web app version:**

- [ ] Zulip Cloud (`*.zulipchat.com`)
- [x] Zulip Server 7.0+
- [ ] Zulip Server 6.0+
- [ ] Zulip Server 5.0 or older
- [ ] Other or not sure



Discussion:
Hello @zulip/server-i18n members, this issue was labeled with the "area: internationalization" label, so you may want to check it out!

<!-- areaLabelAddition -->

@idandr - Thanks for the report! I put up a quick PR to fix those two templates so that the strings are correctly marked for translation/internationalization.

Resolving patch:
diff --git a/zerver/management/commands/makemessages.py b/zerver/management/commands/makemessages.py
--- a/zerver/management/commands/makemessages.py
+++ b/zerver/management/commands/makemessages.py
@@ -52,9 +52,9 @@
 )
 
 regexes = [
-    r"{{#tr}}([\s\S]*?)(?:{{/tr}}|{{#\*inline )",  # '.' doesn't match '\n' by default
-    r'{{\s*t "([\s\S]*?)"\W*}}',
-    r"{{\s*t '([\s\S]*?)'\W*}}",
+    r"{{~?#tr}}([\s\S]*?)(?:~?{{/tr}}|{{#\*inline )",  # '.' doesn't match '\n' by default
+    r'{{~?\s*t "([\s\S]*?)"\W*~?}}',
+    r"{{~?\s*t '([\s\S]*?)'\W*~?}}",
     r'\(t "([\s\S]*?)"\)',
     r'=\(t "([\s\S]*?)"\)(?=[^{]*}})',
     r"=\(t '([\s\S]*?)'\)(?=[^{]*}})",


Test patch:
Repository: zulip/zulip

Issue:
Add inbox view to set of allowed default views.



Discussion:

Resolving patch:
diff --git a/zerver/views/realm.py b/zerver/views/realm.py
--- a/zerver/views/realm.py
+++ b/zerver/views/realm.py
@@ -424,7 +424,7 @@ def realm_reactivation(request: HttpRequest, confirmation_key: str) -> HttpRespo
 
 
 emojiset_choices = {emojiset["key"] for emojiset in RealmUserDefault.emojiset_choices()}
-default_view_options = ["recent_topics", "all_messages"]
+default_view_options = ["recent_topics", "inbox", "all_messages"]
 
 
 @require_realm_admin
diff --git a/zerver/views/user_settings.py b/zerver/views/user_settings.py
--- a/zerver/views/user_settings.py
+++ b/zerver/views/user_settings.py
@@ -127,7 +127,7 @@ def confirm_email_change(request: HttpRequest, confirmation_key: str) -> HttpRes
 
 
 emojiset_choices = {emojiset["key"] for emojiset in UserProfile.emojiset_choices()}
-default_view_options = ["recent_topics", "all_messages"]
+default_view_options = ["recent_topics", "inbox", "all_messages"]
 
 
 def check_settings_values(


Test patch:
diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py
--- a/zerver/tests/test_events.py
+++ b/zerver/tests/test_events.py
@@ -3090,7 +3090,7 @@ def do_set_realm_user_default_setting_test(self, name: str) -> None:
         bool_tests: List[bool] = [True, False, True]
         test_values: Dict[str, Any] = dict(
             color_scheme=UserProfile.COLOR_SCHEME_CHOICES,
-            default_view=["recent_topics", "all_messages"],
+            default_view=["recent_topics", "inbox", "all_messages"],
             emojiset=[emojiset["key"] for emojiset in RealmUserDefault.emojiset_choices()],
             demote_inactive_streams=UserProfile.DEMOTE_STREAMS_CHOICES,
             web_mark_read_on_scroll_policy=UserProfile.WEB_MARK_READ_ON_SCROLL_POLICY_CHOICES,
@@ -3171,7 +3171,7 @@ def do_change_user_settings_test(self, setting_name: str) -> None:
         test_changes: Dict[str, Any] = dict(
             emojiset=["twitter"],
             default_language=["es", "de", "en"],
-            default_view=["all_messages", "recent_topics"],
+            default_view=["all_messages", "inbox", "recent_topics"],
             demote_inactive_streams=[2, 3, 1],
             web_mark_read_on_scroll_policy=[2, 3, 1],
             user_list_style=[1, 2, 3],
diff --git a/zerver/tests/test_realm.py b/zerver/tests/test_realm.py
--- a/zerver/tests/test_realm.py
+++ b/zerver/tests/test_realm.py
@@ -1299,7 +1299,7 @@ def do_test_realm_default_setting_update_api(self, name: str) -> None:
         bool_tests: List[bool] = [False, True]
         test_values: Dict[str, Any] = dict(
             color_scheme=UserProfile.COLOR_SCHEME_CHOICES,
-            default_view=["recent_topics", "all_messages"],
+            default_view=["recent_topics", "inbox", "all_messages"],
             emojiset=[emojiset["key"] for emojiset in RealmUserDefault.emojiset_choices()],
             demote_inactive_streams=UserProfile.DEMOTE_STREAMS_CHOICES,
             web_mark_read_on_scroll_policy=UserProfile.WEB_MARK_READ_ON_SCROLL_POLICY_CHOICES,
Repository: zulip/zulip

Issue:
Update documentation on previews permissions
The help center should be updated following #27783.


Discussion:

Resolving patch:
diff --git a/zerver/lib/url_redirects.py b/zerver/lib/url_redirects.py
--- a/zerver/lib/url_redirects.py
+++ b/zerver/lib/url_redirects.py
@@ -80,6 +80,7 @@ class URLRedirect:
     URLRedirect("/help/configure-default-view", "/help/configure-home-view"),
     URLRedirect("/help/reading-topics", "/help/reading-conversations"),
     URLRedirect("/help/finding-a-topic-to-read", "/help/finding-a-conversation-to-read"),
+    URLRedirect("/help/view-and-browse-images", "/help/view-images-and-videos"),
 ]
 
 LANDING_PAGE_REDIRECTS = [


Test patch:
Repository: zulip/zulip

Issue:
Finish renaming Display settings -> Preferences
To finish out the work in #25945, we should update the following uses of "display settings" -> "preferences":

```
zerver/lib/hotspots.py:            "Go to Settings to configure your notifications and display settings."
zerver/models.py:    ### Display settings. ###
```

as well as many other variables in the code (https://github.com/zulip/zulip/issues/26874#issuecomment-1737885164):

[CZO thread](https://chat.zulip.org/#narrow/stream/9-issues/topic/finish.20renaming.20.22display.20settings.22/near/1647592)


Discussion:
Hello @zulip/server-onboarding members, this issue was labeled with the "area: onboarding" label, so you may want to check it out!

<!-- areaLabelAddition -->

@zulipbot claim
Welcome to Zulip, @Ciggzy1312! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

- Join me on the [Zulip developers' server](https://chat.zulip.org), to get help, chat about this issue, and meet the other developers.
- [Unwatch this repository](https://help.github.com/articles/unwatching-repositories/), so that you don't get 100 emails a day.

As you work on this issue, you'll also want to refer to the [Zulip code contribution guide](https://zulip.readthedocs.io/en/latest/contributing/index.html), as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@zulipbot claim 
@arnavchhokra This issue cannot be claimed, as someone else is already working on it. Please see our [contributor guide](https://zulip.readthedocs.io/en/latest/overview/contributing.html#your-first-codebase-contribution) for advice on finding an issue to work on. Thanks!


Resolving patch:
diff --git a/zerver/lib/hotspots.py b/zerver/lib/hotspots.py
--- a/zerver/lib/hotspots.py
+++ b/zerver/lib/hotspots.py
@@ -27,7 +27,7 @@
     "intro_gear": {
         "title": gettext_lazy("Settings"),
         "description": gettext_lazy(
-            "Go to Settings to configure your notifications and display settings."
+            "Go to Settings to configure your notifications and preferences."
         ),
     },
     "intro_compose": {
diff --git a/zerver/models.py b/zerver/models.py
--- a/zerver/models.py
+++ b/zerver/models.py
@@ -1496,7 +1496,7 @@ class UserBaseSettings(models.Model):
     ### Generic UI settings
     enter_sends = models.BooleanField(default=False)
 
-    ### Display settings. ###
+    ### Preferences. ###
     # left_side_userlist was removed from the UI in Zulip 6.0; the
     # database model is being temporarily preserved in case we want to
     # restore a version of the setting, preserving who had it enabled.


Test patch:
Repository: zulip/zulip

Issue:
Improve "Generate URL for an integration" modal
Following up on #26201, we should:

- [ ] Change the Integration selector to a typeahead dropdown, just like the stream picker. Default text: "Select an integration". That will make it more clear what you are supposed to input in that field.
- [ ] "Send all notifications to a single topic" is checked, but no topic name is configured, disable the "Copy URL" button. Otherwise, the user may be confused about why the integration doesn't work in accordance with the checkbox.

<img width="552" alt="Screen Shot 2023-09-20 at 2 51 34 PM" src="https://github.com/zulip/zulip/assets/2090066/7a569992-d52f-4b58-bade-abf83ac13277">



Discussion:
Hello @zulip/server-integrations members, this issue was labeled with the "area: integrations" label, so you may want to check it out!

<!-- areaLabelAddition -->

@zulipbot claim
claim

Resolving patch:
diff --git a/zerver/lib/events.py b/zerver/lib/events.py
--- a/zerver/lib/events.py
+++ b/zerver/lib/events.py
@@ -512,8 +512,10 @@ def fetch_initial_state_data(
             for bot in EMBEDDED_BOTS
         ]
 
-    # This does not have an apply_events counterpart either since
-    # this data is mostly static.
+    # This does not have an apply_events counterpart either since this
+    # data is mostly static. This excludes the legacy webhook
+    # integrations as those do not follow the same URL construction
+    # patterns as other integrations.
     if want("realm_incoming_webhook_bots"):
         state["realm_incoming_webhook_bots"] = [
             {
@@ -523,6 +525,7 @@ def fetch_initial_state_data(
                 "config": {c[1]: c[0] for c in integration.config_options},
             }
             for integration in WEBHOOK_INTEGRATIONS
+            if integration.legacy is False
         ]
 
     if want("recent_private_conversations"):


Test patch:
Repository: zulip/zulip

Issue:
Document Inbox view
We should document the new webapp Inbox view. Affected pages include:

- [ ] https://zulip.com/help/inbox
- [ ] https://zulip.com/help/configure-default-view:
  - In addition to listing Inbox wherever appropriate, we should change:
   > "Recent conversations is especially recommended for high-traffic organizations, and is configured by default."
   >  ->
   > "**Inbox** works best if you regularly clear all unread messages in most streams you follow. Otherwise, **Recent conversations** works well in high-traffic organizations." (or something along those lines)
- [ ] https://zulip.com/help/reading-strategies

We should also audit for pages that mention Recent conversations, as Inbox may often provide an alternative way to take the same action (e.g., https://zulip.com/help/marking-messages-as-read). 



Discussion:
Hello @zulip/server-user-docs members, this issue was labeled with the "area: documentation (user)" label, so you may want to check it out!

<!-- areaLabelAddition -->


Resolving patch:
diff --git a/zerver/lib/markdown/help_relative_links.py b/zerver/lib/markdown/help_relative_links.py
--- a/zerver/lib/markdown/help_relative_links.py
+++ b/zerver/lib/markdown/help_relative_links.py
@@ -88,12 +88,12 @@ def stream_handle_match(key: str) -> str:
 
 recent_instructions = """
 1. Click on <i class="fa fa-clock-o"></i> **Recent conversations** in the left
-   sidebar.
+   sidebar, or use the <kbd>T</kbd> keyboard shortcut..
 """
 
 all_instructions = """
 1. Click on <i class="fa fa-align-left"></i> **All messages** in the left
-   sidebar or use the <kbd>A</kbd> keyboard shortcut.
+   sidebar, or use the <kbd>A</kbd> keyboard shortcut.
 """
 
 starred_instructions = """
@@ -108,6 +108,11 @@ def stream_handle_match(key: str) -> str:
    keyboard shortcut.
 """
 
+inbox_instructions = """
+1. Click on <i class="zulip-icon zulip-icon-inbox"></i> **Inbox** in the left
+   sidebar, or use the <kbd>Shift</kbd> + <kbd>I</kbd> keyboard shortcut.
+"""
+
 message_info = {
     "drafts": ["Drafts", "/#drafts", draft_instructions],
     "scheduled": ["Scheduled messages", "/#scheduled", scheduled_instructions],
@@ -115,6 +120,7 @@ def stream_handle_match(key: str) -> str:
     "all": ["All messages", "/#all_messages", all_instructions],
     "starred": ["Starred messages", "/#narrow/is/starred", starred_instructions],
     "direct": ["All direct messages", "/#narrow/is/dm", direct_instructions],
+    "inbox": ["Inbox", "/#inbox", inbox_instructions],
 }
 
 
diff --git a/zerver/lib/markdown/tabbed_sections.py b/zerver/lib/markdown/tabbed_sections.py
--- a/zerver/lib/markdown/tabbed_sections.py
+++ b/zerver/lib/markdown/tabbed_sections.py
@@ -72,6 +72,7 @@
     "stream": "From a stream view",
     "not-stream": "From other views",
     "via-recent-conversations": "Via recent conversations",
+    "via-inbox-view": "Via inbox view",
     "via-left-sidebar": "Via left sidebar",
     "instructions-for-all-platforms": "Instructions for all platforms",
     "public-streams": "Public streams",


Test patch:
Repository: zulip/zulip

Issue:
Use silent mentions in personal notification that invite was accepted
At present, if an organization has enabled stream notifications for new users joining, we send a message with a silent mention of the user who just joined:

<img width="438" alt="Screenshot 2023-10-16 at 10 38 30 PM" src="https://github.com/zulip/zulip/assets/2090066/a392805d-7245-4d6b-a55d-6ce58b6705a6">

However, the DM notification to the user who invited the person who just registered has the new user's name and email instead. We should replace the name/email with a silent mention in this message as well, which is a nicer interface for checking who the user is, especially if the new user's email is private.

Current:
<img width="644" alt="Screenshot 2023-10-16 at 10 38 44 PM" src="https://github.com/zulip/zulip/assets/2090066/5a0840a1-e583-408b-bb1c-7177676a69c9">

New:
`@_**fsad** accepted your invitation to join Zulip!`


Discussion:
Hello @zulip/server-bots, @zulip/server-onboarding members, this issue was labeled with the "area: onboarding", "area: bots" labels, so you may want to check it out!

<!-- areaLabelAddition -->

@zulipbot claim
![Screenshot from 2023-10-17 14-19-35](https://github.com/zulip/zulip/assets/90370535/c75994a8-acfe-4d6e-900b-29cca813e004)
before generating the PR I just wanted to confirm , if it's what you expect?

Resolving patch:
diff --git a/zerver/actions/create_user.py b/zerver/actions/create_user.py
--- a/zerver/actions/create_user.py
+++ b/zerver/actions/create_user.py
@@ -254,7 +254,7 @@ def process_new_human_user(
                 get_system_bot(settings.NOTIFICATION_BOT, prereg_user.referred_by.realm_id),
                 prereg_user.referred_by,
                 _("{user} accepted your invitation to join Zulip!").format(
-                    user=f"{user_profile.full_name} <`{user_profile.email}`>"
+                    user=silent_mention_syntax_for_user(user_profile)
                 ),
             )
 


Test patch:
diff --git a/zerver/tests/test_invite.py b/zerver/tests/test_invite.py
--- a/zerver/tests/test_invite.py
+++ b/zerver/tests/test_invite.py
@@ -957,7 +957,7 @@ def test_invite_user_signup_initial_history(self) -> None:
         self.assertEqual(inviter_msg.sender.email, "notification-bot@zulip.com")
         self.assertTrue(
             inviter_msg.content.startswith(
-                f"alice_zulip.com <`{invitee_profile.email}`> accepted your",
+                f"@_**{invitee_profile.full_name}|{invitee_profile.id}** accepted your",
             )
         )
 
diff --git a/zerver/tests/test_users.py b/zerver/tests/test_users.py
--- a/zerver/tests/test_users.py
+++ b/zerver/tests/test_users.py
@@ -826,7 +826,7 @@ def test_create_user_with_multiple_streams(self) -> None:
 
         prereg_user = PreregistrationUser.objects.get(email="fred@zulip.com")
 
-        with self.assert_database_query_count(92):
+        with self.assert_database_query_count(93):
             with self.assert_memcached_count(23):
                 with self.capture_send_event_calls(expected_num_events=11) as events:
                     fred = do_create_user(