I just added a django-pgvector VectorField to my model and am now having an issue with using has_changed.
The error is ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all().
The source of the error is /mixins.py", line 91, in _diff_with_initial
This doesn't happen if is_changed=False but if True then every field in the model is checked for changes.
I think there are two issues here:
- The check for changes should cope with the case where the field value is a vector/list
- The check for changes should only be applied to the fields in when_any, not to all field
Cheers!
I just added a django-pgvector VectorField to my model and am now having an issue with using
has_changed.The error is
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all().The source of the error is /mixins.py", line 91, in _diff_with_initial
This doesn't happen if is_changed=False but if True then every field in the model is checked for changes.
I think there are two issues here:
Cheers!