Skip to content

Commit

Permalink
Merge pull request #199 from VForWaTer/detail_table_fix
Browse files Browse the repository at this point in the history
fix entry.details_table()
  • Loading branch information
AlexDo1 authored Jan 13, 2023
2 parents 7487ef6 + 287b9bb commit 1eb51c1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions metacatalog/models/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,18 @@ def details_table(self, fmt='html'):
details = dict()
for key, detail in self.details_dict(full=True).items():
if isinstance(detail['value'], dict):
expand = {f'{key}.{k}': dict(value=v, id=detail['id'], key=detail['key'], stem=detail['stem']) for k,v in detail['value'].items()}
details.update(expand)
for k, v in detail['value'].items():
expand = {
f'{key}.{k}': dict(
value=v,
id=detail['id'],
key=detail['key'],
stem=detail['stem'],
entry_id=detail['entry_id'],
entry_uuid=detail['entry_uuid']
)
}
details.update(expand)
else:
details[key] = detail

Expand Down

0 comments on commit 1eb51c1

Please sign in to comment.