def post(self):
        raw_dict = request.get_json(force=True)
        try:
            schema.validate(raw_dict)
            request_dict = raw_dict['data']['attributes']
            role = Roles(request_dict['name'],)
            role.add(role)
            # Should not return password hash
            query = Roles.query.get(role.id)
            results = schema.dump(query).data
            return results, 201

        except __HOLE__ as err:
            resp = jsonify({"error": err.messages})
            resp.status_code = 403
            return resp

        except SQLAlchemyError as e:
            db.session.rollback()
            resp = jsonify({"error": str(e)})
            resp.status_code = 403
            return resp
dataset/ETHPy150Open Leo-G/Flask-Scaffold/app/roles/views.py/CreateListRoles.post