Fixed bugs in attribute type saving.
    Updated toJSON model method to properly handle sub-resources and not remove the uuid attribute.
    Updated the add/edit view save method to properly handle no options.