initial stage

This commit is contained in:
Giambattista Bloisi 2024-04-05 17:50:45 +02:00
parent 2eb2a94da5
commit 801516be67
1 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,8 @@ def trasform_product(p: dict) -> dict:
filter(lambda topic: topic.get('topic').get('scheme') == 'FOS', p.get('topics')))))
p['firstPublishDate'] = next(
iter(sorted(filter(lambda date: date.get('type') == 'publishing', p.get('manifestations').get('dates')))),
iter(sorted(filter(lambda date: date.get('type') == 'publishing',
[date for m in p.get('manifestations') for date in m.get('dates')]))),
None)
return p