MCPcopy
hub / github.com/photonixapp/photonix / mutate

Method mutate

photonix/photos/schema.py:952–958  ·  view source on GitHub ↗

Mutation to update preferred_photo_file for photo.

(self, info, selected_photo_file_id=None)

Source from the content-addressed store, hash-verified

950
951 @staticmethod
952 def mutate(self, info, selected_photo_file_id=None):
953 """Mutation to update preferred_photo_file for photo."""
954 photo_obj = PhotoFile.objects.get(id=selected_photo_file_id).photo
955 photo_obj.preferred_photo_file = PhotoFile.objects.get(id=selected_photo_file_id)
956 photo_obj.save()
957 Task(type='generate_thumbnails', subject_id=photo_obj.id).save()
958 return ChangePreferredPhotoFile(ok=True)
959
960
961class EditFaceTag(graphene.Mutation):

Callers

nothing calls this directly

Calls 4

TaskClass · 0.85
getMethod · 0.80
saveMethod · 0.80

Tested by

no test coverage detected