objective categorical abstract machine language personal data server
65
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix record blob refs not being inserted to db when occurring in array

futurGH 1a26cc29 c7bb9f27

+16 -11
+16 -11
pegasus/lib/util.ml
··· 340 340 341 341 (* returns all blob refs in a record *) 342 342 let rec find_blob_refs (record : Mist.Lex.repo_record) : Mist.Blob_ref.t list = 343 - List.fold_left 344 - (fun acc (_, value) -> 345 - match value with 346 - | `BlobRef blob -> 347 - blob :: acc 348 - | `LexMap map -> 349 - find_blob_refs map @ acc 350 - | _ -> 351 - acc ) 352 - [] 353 - (Mist.Lex.String_map.bindings record) 343 + let rec aux acc entries = 344 + List.fold_left 345 + (fun acc value -> 346 + match value with 347 + | `BlobRef blob -> 348 + blob :: acc 349 + | `LexMap map -> 350 + find_blob_refs map @ acc 351 + | `LexArray arr -> 352 + aux acc (Array.to_list arr) @ acc 353 + | _ -> 354 + acc ) 355 + acc entries 356 + in 357 + aux [] (Mist.Lex.String_map.bindings record |> List.map snd) 358 + |> List.sort_uniq (fun (r1 : Mist.Blob_ref.t) r2 -> Cid.compare r1.ref r2.ref) 354 359 355 360 type validate_handle_error = 356 361 | InvalidFormat of string