Skip to content

Commit

Permalink
fixed contribution/xyz.tab exception; added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans-Jörg Bibiko committed Nov 24, 2020
1 parent 8555591 commit bc915da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ids/templates/contribution/detail_tab.mako
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
chapter_id entry_id meaning ${ctx.name|n}_${ctx.default_representation} ${'_'.join([ctx.name, ctx.alt_representation]) + '\t' if ctx.alt_representation else ''|}comment
chapter_id entry_id meaning ${ctx.name|n}_${ctx.default_representation} ${'_'.join([ctx.name, ctx.alt_representation]) + '\t' if ctx.alt_representation else ''|}comment
% for vs in sorted(ctx.valuesets, key=lambda vs: tuple(int(c) for c in vs.parameter.id.split('-'))):
${vs.parameter.chapter.id} ${vs.parameter.id.split('-')[1]} ${vs.parameter.name|n} ${'; '.join(v.name for v in vs.values)|n} ${vs.alt_representation + '\t' if ctx.alt_representation else ''|n}${vs.comment|n}
${vs.parameter.chapter.id} ${vs.parameter.id.split('-')[1]} ${vs.parameter.name|n} ${'; '.join(v.name for v in vs.values)|n} ${'; '.join(v.word.alt_name for v in vs.values if v.word.alt_name is not None) + '\t' if ctx.alt_representation else ''|n}${'; '.join(v.comment for v in vs.values if v.comment is not None)|n}
% endfor
2 changes: 2 additions & 0 deletions tests/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
('get_html', '/contributions/500'),
('get_html', '/contributions.geojson'),
('get_dt', '/contributions'),
('get_html', '/contributions/28.tab'),
('get_html', '/contributions/208.tab'),
('get_dt', '/languages'),
('get_html', '/contributions/215'),
('get_dt', '/values?iSortCol_0=5&sSortDir_0=asc&iSortingCols=1'),
Expand Down

0 comments on commit bc915da

Please sign in to comment.