stream_data: Fix traceback with opening the compose box.

We need to call update_calculated_fields earlier since we
use can_access_subscribers in user_is_subscribed.
This commit is contained in:
Steve Howell 2018-03-20 17:28:57 -04:00 committed by Tim Abbott
parent 51018e12f5
commit 0169a06f99
1 changed files with 2 additions and 0 deletions

View File

@ -428,6 +428,8 @@ exports.create_sub_from_server_data = function (stream_name, attrs) {
sub.color = stream_color.pick_color(used_colors); sub.color = stream_color.pick_color(used_colors);
} }
exports.update_calculated_fields(sub);
exports.add_sub(stream_name, sub); exports.add_sub(stream_name, sub);
return sub; return sub;