Mutation to update preferred_photo_file for photo.
(self, info, selected_photo_file_id=None)
| 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 | |
| 961 | class EditFaceTag(graphene.Mutation): |
nothing calls this directly
no test coverage detected