Fix content dashboards

Content dashboards don't have a department, so when editing them
dashboard.department is undefined.

Wrap it in a conditional.