Skip to content

Commit

Permalink
Change to field.attname
Browse files Browse the repository at this point in the history
  • Loading branch information
viggo-devries committed Nov 22, 2023
1 parent 32aaca4 commit da9b1c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oscar_odin/mappings/_model_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __new__(cls, name, bases, attrs):

for field in meta.fields:
if isinstance(field, ForeignKey):
foreign_key_fields.append(("%s_id" % field.name, field.attname))
foreign_key_fields.append((field.attname, field.attname))

return mapping_type

Expand Down

0 comments on commit da9b1c2

Please sign in to comment.