codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
385 stars 68 forks source link

fixed 500 error when a category is missing its tag set #1330

Closed cellio closed 6 months ago

cellio commented 6 months ago

Fixes https://meta.codidact.com/posts/291055.

Fixed 500 error by making checks nil-safe and displaying some guidance on the tags page. It would be good to also ensure during seeding that this error condition can't arise, but we'd still need this check for new categories where admins forget to specify the tag set.

Now if your category tags are messed up you see this instead of a server error:

This category is missing its tag set. Set this in the Category settings (admin).