From e1c5bffbc21f8a852e522be5d09f8c09c68725c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 13 Apr 2021 15:03:50 +0200 Subject: [PATCH] sql: ignore non-dict values for block fields (#53065) --- wcs/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcs/sql.py b/wcs/sql.py index dc0c98abd..2118e0010 100644 --- a/wcs/sql.py +++ b/wcs/sql.py @@ -1681,7 +1681,7 @@ class SqlMixin: value = datetime.datetime(value.tm_year, value.tm_mon, value.tm_mday) elif sql_type == 'bytea': value = bytearray(pickle.dumps(value, protocol=2)) - elif sql_type == 'jsonb' and value.get('schema'): + elif sql_type == 'jsonb' and isinstance(value, dict) and value.get('schema'): # block field, adapt date/field values value = copy.deepcopy(value) for field_id, field_type in value.get('schema').items():