refactored attribute controller after db changes

Merged M2113 requested to merge AttributeController-fixes into development

Merge request reports