diff options
author | Munyoki Kilyungi | 2023-05-09 13:07:27 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-05-26 08:40:22 +0300 |
commit | 5f2592e10004cf4b943d10db6fe02790b8d411a1 (patch) | |
tree | d34ff09c5073a2381ba0bd223dd72d69f97c9edc | |
parent | 656006cb1ba1adc91a32a71303e7cc74259dc469 (diff) | |
download | gn-transform-databases-5f2592e10004cf4b943d10db6fe02790b8d411a1.tar.gz |
When a field is null during annotation, return an empty string
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-x | dump.scm | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -94,9 +94,12 @@ (symbol->string schema)) ((string? schema) schema) (else - (error "Use a string/symbol")))]) - (string->symbol - (format #f "~s~a" field schema)))) + (error "Use a string/symbol")))] + [string-field (if (number? field) (number->string field) field)]) + (if (string-null? string-field) + "" + (string->symbol + (format #f "~s~a" string-field schema))))) (define (string-split-substring str substr) "Split the string @var{str} into a list of substrings delimited by the |