Skip to content

Commit

Permalink
Fix collection JSON keys
Browse files Browse the repository at this point in the history
  • Loading branch information
fmagin committed Jul 29, 2024
1 parent 77bd21b commit 863ba6a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public record Collection(
public static Collection fromJSONObject(JSONObject json){
return new Collection(
json.getInt("collection_id"),
json.getString("collection_scope"),
json.getString("collection_name"),
json.getString("scope"),
json.getString("name"),
json.getString("last_updated"),
json.getString("model_name"),
json.getJSONArray("tags").toList().stream().map(Object::toString).toList()
Expand All @@ -27,8 +27,8 @@ public static Collection fromJSONObject(JSONObject json){
public static Collection fromSmallJSONObject(JSONObject json, ModelName modelName){
return new Collection(
-1,
json.getString("collection_scope"),
json.getString("collection_name"),
json.getString("scope"),
json.getString("name"),
"",
modelName.modelName(),
List.of()
Expand Down

0 comments on commit 863ba6a

Please sign in to comment.