data_editor enforce logic

I have a data editor that is a DF where one colum (boolean) ‘Data Available’ is not editable while another column (boolean) ‘Include’ is editable since it allows the user to choose which rows of the data_editor to include in the analysis.

By default I set the DF such as where ‘Data Available’ is False, then ‘Include’ is also False. And basically I want to implement a logic so that even if the user tries to tick a row where ‘Data Available’ is at false, ‘Include’ does not change to True.

With the data_editor callback, I manage to catch the change and could pretty much change any other cell of the DF but somehow if I set the modified cell back to False in the column ‘Include’, it does not get unticked in the UI.

Any idea as to how I could manage the desired behaviour?