You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Container kept crashing when trying to create a new record.
Relevant logs and/or screenshots
Empty records causing a type error:
TypeError: object of type 'NoneType' has no len()
Possible fixes
If appears that line #176 (records = cf.zones.dns_records.get(domain_info['zone_id'], params={u'name': name})) is returning an empty object if searched record does not exist. When evaluating the length in line #186 (if len(records) == 0:) a type error is thrown.
Adding a type check resolved the issue. if (records is None or len(records) == 0):
The text was updated successfully, but these errors were encountered:
Summary
Container kept crashing when trying to create a new record.
Relevant logs and/or screenshots
Empty records causing a type error:
TypeError: object of type 'NoneType' has no len()
Possible fixes
If appears that line #176 (
records = cf.zones.dns_records.get(domain_info['zone_id'], params={u'name': name})
) is returning an empty object if searched record does not exist. When evaluating the length in line #186 (if len(records) == 0:
) a type error is thrown.Adding a type check resolved the issue.
if (records is None or len(records) == 0):
The text was updated successfully, but these errors were encountered: