0

Following are two fields in a class of models.py. These are two keys refereed as foreign key from same key of another table.

permenantpincode = models.ForeignKey(Pincodemap, models.DO_NOTHING, db_column='PermenantPincode')
localpincode = models.ForeignKey(Pincodemap, models.DO_NOTHING, db_column='LocalPincode')  # Field name made lowercase.

This is showing following error while migration.

ERRORS:

Volunteer.localpincode: (fields.E304) Reverse accessor for 'Volunteer.localpincode' clashes with reverse accessor for 'Volunteer.permenantpincode'.

How could I fix this ?

Moinuddin Quadri
  • 46,825
  • 13
  • 96
  • 126
Rajadip
  • 2,799
  • 2
  • 11
  • 15
  • You may also take a look at: [Django: reverse accessors for foreign keys clashing](http://stackoverflow.com/questions/22538563/django-reverse-accessors-for-foreign-keys-clashing) – Moinuddin Quadri Feb 19 '17 at 06:58
  • [Reverse accessors for foreign keys clashing](http://stackoverflow.com/q/22538563/608639), [Django Reverse Accessor Clashes](http://stackoverflow.com/q/26955319/608639), [Reverse accessor clash](http://stackoverflow.com/q/29526302/608639), [Django: reverse accessors for foreign keys clashing](http://stackoverflow.com/q/22538563/608639), etc. – jww Feb 19 '17 at 06:59
  • Thank you, I fixed it using above references. – Rajadip Feb 19 '17 at 07:59

0 Answers0