action_1.py 475 B

123456789101112131415
  1. def archiver_resource_show(context, data_dict=None):
  2. '''Return a details of the archival of a resource
  3. :param id: the id of the resource
  4. :type id: string
  5. :rtype: dictionary
  6. '''
  7. id_ = _get_or_bust(data_dict, 'id')
  8. archival = Archival.get_for_resource(id_)
  9. if archival is None:
  10. raise ObjectNotFound
  11. archival_dict = archival.as_dict()
  12. p.toolkit.check_access('archiver_resource_show', context, data_dict)
  13. return archival_dict