mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-15 01:24:29 +02:00
fix for datetime or integer fields
This commit is contained in:
@ -341,11 +341,10 @@ def _process(proc_data: List[JSONDictType]) -> List[JSONDictType]:
|
|||||||
|
|
||||||
if key in DT_OR_INT_HEADERS:
|
if key in DT_OR_INT_HEADERS:
|
||||||
timestamp = jc.utils.timestamp(item[key], format_hint=(3500,)).utc
|
timestamp = jc.utils.timestamp(item[key], format_hint=(3500,)).utc
|
||||||
int_val = jc.utils.convert_to_int(item[key])
|
|
||||||
if timestamp:
|
if timestamp:
|
||||||
item[key + '_epoch_utc'] = timestamp
|
item[key + '_epoch_utc'] = timestamp
|
||||||
if int_val is not None:
|
if item[key].isnumeric():
|
||||||
item[key] = int_val
|
item[key] = jc.utils.convert_to_int(item[key])
|
||||||
|
|
||||||
# special handling
|
# special handling
|
||||||
if 'x-cache-hits' in item:
|
if 'x-cache-hits' in item:
|
||||||
|
Reference in New Issue
Block a user