CBIIT / bento-meta

Bento Metamodel
8 stars 2 forks source link

missing and superfluous arguments in `object_map.py` #10

Closed bensonml closed 4 years ago

bensonml commented 4 years ago

There appears to be an unused parameter albl that not used in the query in object_map.py lines 449 - 453 https://github.com/CBIIT/bento-meta/blob/eda7de23e00345af446bc2995315939bb2b78cf8/python/bento_meta/object_map.py#L449

          return "MATCH (n:{lbl}){rel}(a) WHERE id(n)={neoid} DELETE r RETURN id(n),id(a)".format(
            lbl=self.cls.mapspec()["label"],
            albl=end_lbls[0],
            rel=rel,
            neoid=obj.neoid)

and a missing parameter aneoid and unused parameter albl in the query in object_map.py lines 475 - 480 https://github.com/CBIIT/bento-meta/blob/eda7de23e00345af446bc2995315939bb2b78cf8/python/bento_meta/object_map.py#L475

            qry = "MATCH (n:{lbl}){rel}(a) WHERE id(n)={neoid} AND id(a)={**aneoid**} AND ({cond}) DELETE r RETURN id(n),id(a)".format(
              lbl=self.cls.mapspec()["label"],
              albl=end_lbls[0],
              neoid=obj.neoid,
              cond=cond,
              rel=rel)