Skip to content

Commit

Permalink
Merge pull request #186 from nautobot/python_version_bump
Browse files Browse the repository at this point in the history
Updated upper bound for Python version
  • Loading branch information
abates authored Sep 19, 2024
2 parents 8158e32 + 8c517b9 commit 7ea643d
Show file tree
Hide file tree
Showing 3 changed files with 341 additions and 140 deletions.
12 changes: 6 additions & 6 deletions nautobot_design_builder/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ def _init_through(self):
if self.field.remote_field.through_fields:
self.link_field = self.field.remote_field.through_fields[0]
else:
for f in self.through._meta.fields:
if f.related_model == self.field.model:
self.link_field = f.name
for field in self.through._meta.fields:
if field.related_model == self.field.model:
self.link_field = field.name

def _get_related_model(self, value):
"""Get the appropriate related model for the value.
Expand Down Expand Up @@ -295,9 +295,9 @@ def _init_through(self):
if self.field.through_fields:
self.link_field = self.field.through_fields[0]
else:
for f in self.through._meta.fields:
if f.related_model == self.field.model:
self.link_field = f.name
for field in self.through._meta.fields:
if field.related_model == self.field.model:
self.link_field = field.name


class GenericRelationField(BaseModelField, RelationshipFieldMixin): # pylint:disable=too-few-public-methods
Expand Down
Loading

0 comments on commit 7ea643d

Please sign in to comment.