Hi,
Sometimes, reviewed items will be merged by an admin, so, whenever I merge Item B to Item A, I also move all the reviews of B to A.
I do it this way:
ReviewedItem.objects.filter(gear = slave).update(object_id =
master.id)
Apparently this is not enough, though, because the content_object member of ReviewedItem will be None after that.
But if I change the line above to include a "content_object = master" in the .update() statement, Django will complain about FieldNotFoundError.
I suppose there's some magic to the GenericForeignKey that I didn't understand.
Can anyone tell me how to properly update an instance so it refers to a different item?
Thank you!