initial stage

This commit is contained in:
Giambattista Bloisi 2024-04-05 17:55:30 +02:00
parent 801516be67
commit 3b27f4ea1c
1 changed files with 5 additions and 2 deletions

View File

@ -52,8 +52,11 @@ 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',
[date for m in p.get('manifestations') for date in m.get('dates')]))),
iter(
sorted(
map(lambda date: date.get('value'),
filter(lambda date: date.get('type') == 'publishing',
[date for m in p.get('manifestations') for date in m.get('dates')])))),
None)
return p