Skip to content

Commit

Permalink
Check if record is not None
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolai Buchwitz committed Aug 13, 2018
1 parent df167a8 commit 3bb3aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nc_dnsapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def dns_record(self, domain, record):
return None

def delete_dns_record(self, domain, record, ignore_unknown=True):
if not record.id:
if not record or not record.id:
raise ValueError("Missing id of record to update")

record.deleterecord = True
Expand Down

0 comments on commit 3bb3aa7

Please sign in to comment.