Return immediately in _parse_records if tag.ndef is null
This commit is contained in:
parent
caa962c686
commit
09caa66317
1 changed files with 3 additions and 0 deletions
|
@ -67,6 +67,9 @@ class NfcBackend(Backend):
|
||||||
import ndef
|
import ndef
|
||||||
records = []
|
records = []
|
||||||
|
|
||||||
|
if not tag.ndef:
|
||||||
|
return records
|
||||||
|
|
||||||
for record in tag.ndef.records:
|
for record in tag.ndef.records:
|
||||||
r = {
|
r = {
|
||||||
'record_type': record.type,
|
'record_type': record.type,
|
||||||
|
|
Loading…
Reference in a new issue