# 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
                    "id": elem["id"],
                    "tags": _expand_tags(tags, t2l.checkTags(tags)),
                    "fixes": [],
                   }
        for fix_index, fix_group in enumerate(marker['fixes'] or []):
          for fix in fix_group:
            if (fix['type'] and
                fix['type'] == elem['type'] and
                fix['id'] == elem["id"]):
              tmp_elem["fixes"].append({"num": fix_index,
                                      "add": _expand_tags(fix['create'], t2l.checkTags(fix['create'])),
                                      "mod": _expand_tags(fix['modify'], t2l.checkTags(fix['modify'])),
                                      "del": _expand_tags(fix['delete'], {}, True),
                                     })
        elems.append(tmp_elem)

    new_elems = []
    for fix_index, fix_group in enumerate(marker['fixes'] or []):
      for fix in fix_group:
        if fix['type']:
            found = False
            for e in elems:
                if (e["type"] == data_type[fix['type']] and
                    e["id"] == fix['id']):

                    found = True
                    break
            if not found:
                new_elems.append({"num": fix_index,
                                  "add": _expand_tags(fix['create'], t2l.checkTags(fix['create'])),

# 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

                    "id": elem["id"],
                    "tags": _expand_tags(tags, t2l.checkTags(tags)),
                    "fixes": [],
                   }
        for fix_index, fix_group in enumerate(marker['fixes'] or []):
          for fix in fix_group:
            if (fix['type'] and
                fix['type'] == elem['type'] and
                fix['id'] == elem["id"]):
              tmp_elem["fixes"].append({"num": fix_index,
                                      "add": _expand_tags(fix['create'], t2l.checkTags(fix['create'])),
                                      "mod": _expand_tags(fix['modify'], t2l.checkTags(fix['modify'])),
                                      "del": _expand_tags(fix['delete'], {}, True),
                                     })
        elems.append(tmp_elem)

    new_elems = []
    for fix_index, fix_group in enumerate(marker['fixes'] or []):
      for fix in fix_group:
        if fix['type']:
            found = False
            for e in elems:
                if (e["type"] == data_type[fix['type']] and
                    e["id"] == fix['id']):

                    found = True
                    break
            if not found:
                new_elems.append({"num": fix_index,
                                  "add": _expand_tags(fix['create'], t2l.checkTags(fix['create'])),

                                  "mod": _expand_tags(fix['modify'], t2l.checkTags(fix['modify'])),