Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit ba604b5

Browse files
author
Tim Sowers
committed
Remove Limited records from Code.gov endpoint.
1 parent ef2d21a commit ba604b5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/gov/osti/services/CodeGov.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,13 @@ public Response listApprovedSnapshots()
358358

359359
// map Snapshot JSON to Metadata objects
360360
List<DOECodeMetadata> metadataList = new ArrayList<>();
361-
for (MetadataSnapshot s : snapshots)
361+
for (MetadataSnapshot s : snapshots) {
362362
// pull metadata from snapshot
363-
metadataList.add(JSON_MAPPER.readValue(s.getJson(), DOECodeMetadata.class));
363+
DOECodeMetadata md = JSON_MAPPER.readValue(s.getJson(), DOECodeMetadata.class);
364+
365+
if (!md.getIsLimited())
366+
metadataList.add(md);
367+
}
364368

365369
// create a List of Metadata records, then filter down to desired results
366370
RecordsList records = new RecordsList(metadataList);

0 commit comments

Comments
 (0)