From 3cf9f9452b007fa26701346fd39c155fd97dbb27 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sat, 27 Jul 2019 01:28:08 +0300 Subject: [PATCH] csv_metadata_quality/check.py: Always return field We always need to return the field back so apply doesn't set it to null when creating the new data frame. --- csv_metadata_quality/check.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/csv_metadata_quality/check.py b/csv_metadata_quality/check.py index 0568a50..559d7e6 100755 --- a/csv_metadata_quality/check.py +++ b/csv_metadata_quality/check.py @@ -22,6 +22,8 @@ def issn(field): if not issn.is_valid(value): print(f'Invalid ISSN: {value}') + return field + def isbn(field): """Check if an ISBN is valid. @@ -45,6 +47,8 @@ def isbn(field): if not isbn.is_valid(value): print(f'Invalid ISBN: {value}') + return field + def separators(field): """Check for invalid multi-value separators (ie "|" or "|||"). @@ -66,3 +70,6 @@ def separators(field): if len(match) > 0: print(f'Invalid multi-value separator: {field}') + + + return field