# Path: api/issue_utils.py
# def _get(db, err_id=None, uuid=None):
# def _expand_tags(tags, links, short = False):


from bottle import default_app, route, response, abort
from modules import utils
from modules import OsmSax
from modules.query import fixes_default
from .issue_utils import t2l, _get, _expand_tags
import io, copy
    }

    if fix_num != None:
      ret["fix"] = {}
      for res in marker['fixes'][fix_num]:
        tid = data_type[res['type']] + str(res['id'])
        if tid in elems:
            fix_elem_tags = copy.copy(elems[tid]["tags"])
            for k in res['delete']:
                if k in fix_elem_tags:
                    del fix_elem_tags[k]
            for (k, v) in res['create'].items():
                fix_elem_tags[k] = v
            for (k, v) in res['modify'].items():
                fix_elem_tags[k] = v

            ret["fix"][tid] = fix_elem_tags

    for elem in ret['elems']:
        elem["tags"] = expand_tags(elem["tags"])

    return ret


@app_0_2.route('/error/<err_id:int>')
def error_err_id(db, lang, err_id):
    return _error(2, db, lang, None, _get(db, err_id=err_id))

@route('/issue/<uuid:uuid>')
def error_uuid(db, langs, uuid):

# Path: api/issue_utils.py
# def _get(db, err_id=None, uuid=None):
# def _expand_tags(tags, links, short = False):


# Path: api/issue.py
from bottle import default_app, route, response, abort
from modules import utils
from modules import OsmSax
from modules.query import fixes_default
from .issue_utils import t2l, _get, _expand_tags
import io, copy

    }

    if fix_num != None:
      ret["fix"] = {}
      for res in marker['fixes'][fix_num]:
        tid = data_type[res['type']] + str(res['id'])
        if tid in elems:
            fix_elem_tags = copy.copy(elems[tid]["tags"])
            for k in res['delete']:
                if k in fix_elem_tags:
                    del fix_elem_tags[k]
            for (k, v) in res['create'].items():
                fix_elem_tags[k] = v
            for (k, v) in res['modify'].items():
                fix_elem_tags[k] = v

            ret["fix"][tid] = fix_elem_tags

    for elem in ret['elems']:
        elem["tags"] = expand_tags(elem["tags"])

    return ret


@app_0_2.route('/error/<err_id:int>')
def error_err_id(db, lang, err_id):
    return _error(2, db, lang, None, _get(db, err_id=err_id))

@route('/issue/<uuid:uuid>')
def error_uuid(db, langs, uuid):

    return _error(3, db, langs, uuid, _get(db, uuid=uuid))