photo:getDevelopSettings() sometimes returns nil for Temperature and Tint. Tested in LR 12.2 and 10.4 on Mac OS 12.6.1.
To reproduce:
1. Download and unzip this catalog folder ("Temperature"):
https://www.dropbox.com/s/z527z9to4ie46vx/Temperature.2023.03.02.zip?dl=0
2. Copy the file "get-temperature.lua" from the catalog folder to the User Scripts folder.
3. Open the Temperature catalog.
4. Select the one photo and go to Develop.
5. Go to Library and do Scripts > get-temperature. Observe the temperature and tint are correctly displayed:
6. Do Quick Develop > Reset All.
7. Do Scripts > get-temperature and observe that temperature and tint are incorrectly nil: