Exception in webhook admin UI

Since the removal of various _.underscore methods, I’ve been noticing a few null exceptions, some may be something I need to address in my plugins, but there’s at least one in core:

  1. Navigate to /admin/api/web_hooks/new

  2. An exception is thrown.

TypeError: Cannot read property 'forEach' of undefined
at Function.findByIds (discourse/models/category:232)

See https://github.com/discourse/discourse/commit/9672c92045f31cc47976518d22137015722805d6#diff-d41231bde8cb5d18070eb38dcbee151eR262 and comments.

@joffreyjaffeux

ps. @pfaffman

1 Like

Yes will fix it tomorrow and maybe write a test for this too. I didnt want to check for niull everywhere. :+1:t2:

4 Likes

There is already an open bug for this assigned to @vinothkannans

1 Like

This is fixed as per commit

https://github.com/discourse/discourse/commit/036790d13c728e9d30223f0079d539b4de203e7f

4 Likes