File tree Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -526,7 +526,11 @@ def get_current_node_field_specifiers(self) -> NodeFieldSpecifierMap:
526526 return self ._current_node_field_specifiers
527527
528528 def read_result (self , query_result : QueryResult ) -> None :
529- path = query_result .get_path (label = "diff_path" )
529+ try :
530+ path = query_result .get_path (label = "diff_path" )
531+ except ValueError :
532+ # the path was null, so nothing to read
533+ return
530534 database_path = DatabasePath .from_cypher_path (cypher_path = path )
531535 self ._parse_path (database_path = database_path )
532536 self ._current_node_field_specifiers = None
Original file line number Diff line number Diff line change @@ -199,6 +199,13 @@ def __init__(
199199 diff_rel_paths = [], item IN [penultimate_path, peer_path] |
200200 CASE WHEN item IS NULL THEN diff_rel_paths ELSE diff_rel_paths + [item] END
201201) AS diff_rel_paths, has_more_data
202+ // ------------------------
203+ // make sure we still include has_more_data if diff_rel_paths is empty
204+ // ------------------------
205+ WITH CASE
206+ WHEN diff_rel_paths = [] THEN [NULL]
207+ ELSE diff_rel_paths
208+ END AS diff_rel_paths, has_more_data
202209 """
203210
204211 def get_previous_base_path_query (self , db : InfrahubDatabase ) -> str :
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ async def mutate(
225225
226226 async with graphql_context .db .start_session () as db :
227227 proposed_change .state .value = ProposedChangeState .MERGING .value
228- proposed_change .save (db = db )
228+ await proposed_change .save (db = db )
229229
230230 if wait_until_completion :
231231 await graphql_context .service .workflow .execute_workflow (
Original file line number Diff line number Diff line change 1+ Fix a problem in the logic to calculate a diff that could cause it to quit too early under certain unlikely circumstances
You can’t perform that action at this time.
0 commit comments