-
Notifications
You must be signed in to change notification settings - Fork 3
Description
When using Lambdora with a Hyku front-end, creating the default AdminSet (via its rake task, hyrax:default_admin_set:create) succeeds, and results in the following object in Lambdora:
https://627cys77vl.execute-api.us-east-1.amazonaws.com/dev/dev/ad/mi/n_/se/admin_set/default
However, when manually creating a new AdminSet from the Hyku UI, we encounter a Model mismatch. Expected AdminSet. Got: ActiveFedora::Base error. On the backend the AdminSet is created, but its path structure is quite different from the Default AdminSet, e.g.
https://627cys77vl.execute-api.us-east-1.amazonaws.com/dev/dev/abab7f63-5a3e-44f0-8a65-01133ecc7057
After creation of the new AdminSet, Hyku makes later GET calls to retrieve that AdminSet via a "pairtree" like path: https://627cys77vl.execute-api.us-east-1.amazonaws.com/dev/dev/ab/ab/7f/63/abab7f63-5a3e-44f0-8a65-01133ecc7057
Strangely, both of these paths are created in Lambdora, but only the first path (/dev/abab7f63-5a3e-44f0-8a65-01133ecc7057) includes all necessary AdminSet triples, while the second path (/dev/ab/ab/7f/63/abab7f63-5a3e-44f0-8a65-01133ecc7057) is an "empty", unnamed container.
It seems that the Model mismatch error results from a GET request to the second path, as that error seems to only occur when the hasModel triple is missing from the response: https://github.com/samvera/active_fedora/blob/11-4-stable/lib/active_fedora/relation/finder_methods.rb#L210
We suspect that active_fedora is generating these pairtree-like paths for UUIDs (including the "admin_set/default" UUID of the Default AdminSet), but have not yet determined where that occurs and whether this is a bug in active_fedora or in Lambdora (or both).