omniport-backend icon indicating copy to clipboard operation
omniport-backend copied to clipboard

Missing of some unique field in FacultyMember

Open pradumangoyal opened this issue 5 years ago • 3 comments

Describe the bug There isn't any unique field in the FacultyMember model currently. There should be a unique field throughout the model which can be used to identify one Faculty from the list. I think employee_id can be one such field, as added in the commit in shell for IIT-R.

pradumangoyal avatar Jun 01 '20 02:06 pradumangoyal

If there are no primary keys, Django adds an id automatically. Is that not adequate?

dhruvkb avatar Jun 01 '20 04:06 dhruvkb

I know about the id, but my concern is identifying the faculty not the primary key. Just like a Student have a unique enrolment number, Faculty should have a unique number. This can help in two ways:

  1. Whenever there is required a migration from some institute data to the Omniport or vice-versa, there should be some key which maps both the data.
  2. With this we can offer a login through employee_id just like student can login through their enrolment number.

I am not sure if for every institute, faculty get an employee id, but if it is true, there is no field in the Omniport to store this data.

pradumangoyal avatar Jun 01 '20 04:06 pradumangoyal

That's why we added that in shell. We aren't sure if other institutes have this field, so we can't add that field in the kernel.

dhruvkb avatar Jun 01 '20 05:06 dhruvkb