Skip to content

Commit

Permalink
update-portinfo: Handle TypeError in variants
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsalyan committed Aug 3, 2020
1 parent 1fc1b30 commit 932ff73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/port/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def load_ports_table(ports):
variant = v['variant']
except KeyError:
continue
except TypeError:
break

v_obj, created = Variant.objects.get_or_create(port_id=port_object.id, variant__iexact=variant, defaults={'variant': variant})
v_obj.description = v.get('description')
Expand Down

0 comments on commit 932ff73

Please sign in to comment.