Skip to content

Commit

Permalink
Merge pull request #10 from NCAR/OpenAtmos-JSON
Browse files Browse the repository at this point in the history
Fixed Reactants and Products in the OpenAtmos JSON
  • Loading branch information
ecyr20 authored Apr 9, 2024
2 parents d6c185c + 6f719af commit cb0f9fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Models/Reaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class Reaction
public Guid uuid { get; set; }
public string? type { get; set; }
public bool isDel { get; set; }
public Guid? reactant_list_uuid { get; set; }
public Guid? product_list_uuid { get; set; }
public Guid reactant_list_uuid { get; set; }
public Guid product_list_uuid { get; set; }
}
}
4 changes: 2 additions & 2 deletions Services/OpenAtmosService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public async Task<string> Get(Guid tag_mechanism_uuid)

JSON += " , \n";
}
var reactants = reactantProductListService.GetReactantsAsync(reaction.uuid).Result;
var reactants = reactantProductListService.GetReactantsAsync(reaction.reactant_list_uuid).Result;
JSON += " \"reactants\": [ \n" +
" {\n";
foreach (ReactantsProducts reactant in reactants)
Expand All @@ -124,7 +124,7 @@ public async Task<string> Get(Guid tag_mechanism_uuid)
JSON += " }\n" +
" ], \n";

var products = reactantProductListService.GetProductsAsync(reaction.uuid).Result;
var products = reactantProductListService.GetProductsAsync(reaction.product_list_uuid).Result;
JSON += " \"products\": [ \n" +
" {\n";
foreach (ReactantsProducts product in products)
Expand Down

0 comments on commit cb0f9fd

Please sign in to comment.