AtlasSystems/ArchivesSpace-Aeon-Fulfillment-Plugin

"has_top_container" always evaluates to false

Closed this issue · 2 comments

https://github.com/AtlasSystems/ArchivesSpace-Aeon-Fulfillment-Plugin/blob/master/public/models/record_mapper.rb#L42

-                instances = self.record.dig('json', 'instances')
+                instances = self.record.json['instances']

I think the above should do the trick.

I thought I was going crazy when trying to add the ":requests_permitted_containers_only" to a config file, but then started looking at the helpful log, which indicated "Containers Found? False" even when containers were part of the record.

Hello @fordmadox

Thank you for opening up this issue, I'm seeing some unexpected behavior with this setting as well. It appears that this used to but is no longer working. Do you know which version of ArchivesSpace you tested this on?

I can go ahead and make this change, unless you would like to submit a pull request.

Thanks,
Austin

Thanks, @AustinTSchaffer: I've been testing off of the ASpace master branch. I looked at the two sites that I think are using this plugin in production; both sites permit requests at every archival object, regardless of top container, and since it didn't affect those two sites I didn't dig any further.

Please feel to make the change that I suggested, or whatever else would be best. That was just the first thing that I tried, and since it worked, I kept that test in my place while doing some local testing.