From 09caa66317217f576d6995af6bcbda34f8b3f860 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 8 Dec 2019 21:25:39 +0100 Subject: [PATCH] Return immediately in _parse_records if tag.ndef is null --- platypush/backend/nfc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platypush/backend/nfc.py b/platypush/backend/nfc.py index c97aa1d3f..3f042e2cb 100644 --- a/platypush/backend/nfc.py +++ b/platypush/backend/nfc.py @@ -67,6 +67,9 @@ class NfcBackend(Backend): import ndef records = [] + if not tag.ndef: + return records + for record in tag.ndef.records: r = { 'record_type': record.type,