X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b95b09260db87f6665bfcef3fb4f7c19f8acb666..45b3f39b2548169718f640227d3c09064cdfa9cb:/src/contact/admin.py?ds=sidebyside diff --git a/src/contact/admin.py b/src/contact/admin.py index 41095092e..a05943381 100644 --- a/src/contact/admin.py +++ b/src/contact/admin.py @@ -157,11 +157,11 @@ def extract_view(request, form_tag, extract_type_slug): for key in keys: if key not in record: record[key] = '' - if isinstance(record[key], basestring): + if isinstance(record[key], str): pass elif isinstance(record[key], bool): record[key] = 'tak' if record[key] else 'nie' - elif isinstance(record[key], (list, tuple)) and all(isinstance(v, basestring) for v in record[key]): + elif isinstance(record[key], (list, tuple)) and all(isinstance(v, str) for v in record[key]): record[key] = ', '.join(record[key]) else: record[key] = json.dumps(record[key])