Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
northdpole committed Oct 24, 2023
1 parent 89d45cc commit 68c2199
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions application/database/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ def add_embedding(

return existing

def get_gap_analysis_result(self, cache_key)->str:
def get_gap_analysis_result(self, cache_key) -> str:
res = (
self.session.query(GapAnalysisResults)
.filter(GapAnalysisResults.cache_key == cache_key)
Expand All @@ -1648,12 +1648,11 @@ def get_gap_analysis_result(self, cache_key)->str:
def add_gap_analysis_result(self, cache_key: str, ga_object: str):
existing = self.get_gap_analysis_result(cache_key)
if not existing:
res = GapAnalysisResults(
cache_key=cache_key, ga_object=ga_object
)
res = GapAnalysisResults(cache_key=cache_key, ga_object=ga_object)
self.session.add(res)
self.session.commit()


def dbNodeFromNode(doc: cre_defs.Node) -> Optional[Node]:
if doc.doctype == cre_defs.Credoctypes.Standard:
return dbNodeFromStandard(doc)
Expand Down Expand Up @@ -1841,7 +1840,7 @@ def gap_analysis(
cre_db.add_gap_analysis_result(
cache_key=make_cache_key(node_names, key),
ga_object=flask_json.dumps({"result": extra_paths_dict[key]}),
)
)
# conn.set(
# cache_key + "->" + key,
# flask_json.dumps({"result": extra_paths_dict[key]}),
Expand Down

0 comments on commit 68c2199

Please sign in to comment.