File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1+ # [ 1.6.1] ( https://github.com/ComplianceAsCode/auditree-framework/releases/tag/v1.6.1 )
2+
3+ - [ FIXED] Table of contents now handles old/abandoned report evidence metadata appropriately.
4+
15# [ 1.6.0] ( https://github.com/ComplianceAsCode/auditree-framework/releases/tag/v1.6.0 )
26
37- [ ADDED] Check reports table of contents now appended to an evidence locker's README.
Original file line number Diff line number Diff line change 1414# limitations under the License.
1515"""Compliance automation package."""
1616
17- __version__ = '1.6.0 '
17+ __version__ = '1.6.1 '
Original file line number Diff line number Diff line change @@ -120,9 +120,9 @@ def generate_toc(self, rpt_metadata):
120120 continue
121121 rpt_descr = meta ['description' ] or pathlib .Path (rpt ).name
122122 rpt_url = self .locker .get_remote_location (rpt , False )
123- check = meta [ 'checks' ] [0 ].rsplit ('.' , 1 ).pop (0 )
123+ check = meta . get ( 'checks' , [ 'N/A' ]) [0 ].rsplit ('.' , 1 ).pop (0 )
124124 evidences = []
125- for ev in meta [ 'evidence' ] :
125+ for ev in meta . get ( 'evidence' , []) :
126126 ev_path = pathlib .Path (ev ['path' ])
127127 ev_descr = ev ['description' ] or ev_path .name
128128 if not ev .get ('partitions' ):
@@ -151,13 +151,13 @@ def generate_toc(self, rpt_metadata):
151151 'from' : ev ['last_update' ]
152152 }
153153 )
154- accreditations = self .controls .get_accreditations (check )
154+ accreditations = sorted ( self .controls .get_accreditations (check ) )
155155 rpts .append (
156156 {
157157 'descr' : rpt_descr ,
158158 'url' : rpt_url ,
159159 'check' : check ,
160- 'accreditations' : ', ' .join (sorted ( accreditations )) ,
160+ 'accreditations' : ', ' .join (accreditations ) or 'N/A' ,
161161 'from' : meta ['last_update' ],
162162 'evidences' : sorted (evidences , key = lambda ev : ev ['descr' ])
163163 }
You can’t perform that action at this time.
0 commit comments