[PATCH 2 of 2 eac] Add @filter_empty decorator on the DateEntity generating function

Guillaume Vandevelde guillaume.vandevelde at logilab.fr
Wed Aug 28 15:00:11 CEST 2019


# HG changeset patch
# User Guillaume Vandevelde <gvandevelde at logilab.fr>
# Date 1566987704 -7200
#      Wed Aug 28 12:21:44 2019 +0200
# Node ID d2aa09a59023f1da7899380f19933e33d6153170
# Parent  35185252332b858d716f3eb5c82051f8ead90aa9
# Available At http://hg.logilab.org/review/cubes/eac
#              hg pull http://hg.logilab.org/review/cubes/eac -r d2aa09a59023
Add @filter_empty decorator on the DateEntity generating function

diff -r 35185252332b -r d2aa09a59023 cubicweb_eac/dataimport.py
--- a/cubicweb_eac/dataimport.py	Wed Aug 28 14:43:49 2019 +0200
+++ b/cubicweb_eac/dataimport.py	Wed Aug 28 12:21:44 2019 +0200
@@ -463,6 +463,7 @@
                                                 ('alternative_form', 'eac:alternativeForm')))
         yield ExtEntity('ParallelNames', self._gen_extid(), values)
 
+    @filter_empty
     def extract_dates_from(self, elem, tag):
         for date in self.find_nested(elem, 'eac:date', tag):
             yield ExtEntity('DateEntity', self._gen_extid(),



More information about the saem-devel mailing list