Beispiel #1
0
def tag_patch(tag_id):
    body = request.json

    tag = db.session.query(Tag).get(tag_id)

    if body.get('description'):
        tag.description = body['description']

    db.session.commit()
    return json.dumps(Tag.transform(tag))