Ok, so the issue was with these lines:
shot["custom_attributes"] = shot_data["custom_attributes"]
shot["metadata"] = shot_data["metadata"]
which doesn't work anymore, at least with ftrack 3.5.9 and API version 1.0.4. All credits to Eric Hermelin from ftrack support for figuring it out and providing the solution:
for key, value in shot_data["custom_attributes"].items():
shot['custom_attributes'][key] = value
for key, value in shot_data["metadata"].items():
shot['metadata'][key] = value
Everything is working fine again now.
Thanks Eric and Matthias for resol