Insert pvs config into uicfg setup loop
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 25 Aug 2016 09:50:23 +0200
changeset 1497 cb556ac5ce2f
parent 1496 bdb48b8daaab
child 1498 7c4ea7a5677c
Insert pvs config into uicfg setup loop
views/archivetransfer.py
--- a/views/archivetransfer.py	Thu Aug 25 09:46:58 2016 +0200
+++ b/views/archivetransfer.py	Thu Aug 25 09:50:23 2016 +0200
@@ -44,23 +44,17 @@
 
 pvs.tag_attribute(('SEDAArchiveTransfer', 'title'), 'hidden')
 pvs.tag_attribute(('SEDAArchiveTransfer', 'simplified_profile'), 'hidden')
-pvs.tag_subject_of(('SEDAArchiveTransfer', 'seda_archival_agency', '*'), 'attributes')
-pvs.tag_subject_of(('SEDAArchiveTransfer', 'seda_transferring_agency', '*'), 'attributes')
-pvs.tag_object_of(('*', 'seda_signature', 'SEDAArchiveTransfer'), 'attributes')
-pvs.tag_object_of(('*', 'seda_archival_agreement', 'SEDAArchiveTransfer'), 'attributes')
-pvs.tag_object_of(('*', 'seda_service_level', 'SEDAArchiveTransfer'), 'attributes')
-pvs.tag_object_of(('*', 'seda_transfer_request_reply_identifier', 'SEDAArchiveTransfer'),
-                  'attributes')
-pvs.tag_object_of(('*', 'seda_comment', 'SEDAArchiveTransfer'), 'attributes')
 
 for rtype, role in at_ordered_fields:
     if rtype.endswith('agency'):
         assert role == 'subject'
+        pvs.tag_subject_of(('SEDAArchiveTransfer', rtype, '*'), 'attributes')
         rec.tag_subject_of(('SEDAArchiveTransfer', rtype, '*'),
                            {'rvid': 'seda.reledit.simplelink',
                             'novalue_label': _('<no value specified>')})
     else:
         assert role == 'object'
+        pvs.tag_object_of(('*', rtype, 'SEDAArchiveTransfer'), 'attributes')
         rec.tag_object_of(('*', rtype, 'SEDAArchiveTransfer'),
                           {'rvid': 'seda.reledit.text',
                            'novalue_label': _('<unauthorized>')})