Currently, there are ministries that do not have a person assigned during whole/partial time period of a ministry's active time period. This is handled in the frontend to fill with the president at that time in most cases( in active ministries grid, persons tab and department history timeline views )
There is a limitation when it comes to creating person profile for persons who served as presidents as all of the "filling gaps" positions are not tracked as a result of not having as_appointed relations in the database.
There are 2 solutions
-
Create a dictionary when the data is first loaded, traverse through all ministries attached to all presidents, find gaps in as_appointed time stamps within the ministry's time period and assign those gap time periods to the president in the Frontend
-
Create a separate script that will identify these gaps and create relations in the database itself (frontend reads all as_appointed for a person straightforwardly)