Return immediately in _parse_records if tag.ndef is null

This commit is contained in:
Fabio Manganiello 2019-12-08 21:25:39 +01:00
parent caa962c686
commit 09caa66317
1 changed files with 3 additions and 0 deletions

View File

@ -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,