You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though Product.keywords.all() will return assigned keywords, Product.keywords_string does not return the csv of keywords.
The problem lies here:
save_model is run first in the admin and the old version of Product instance is saved as self._product=obj
related_items_changed runs after for the KeywordField
then save_formset runs and saves the previous obj in self._product over the new
keywords_string are overwritten
fetching the Product in save_formset does indeed fix the issue, however, I am not sure if this is the best way to go about it
self._product=Product.objects.get(pk=self._product.pk)
The text was updated successfully, but these errors were encountered:
Even though Product.keywords.all() will return assigned keywords, Product.keywords_string does not return the csv of keywords.
The problem lies here:
save_model is run first in the admin and the old version of Product instance is saved as self._product=obj
related_items_changed runs after for the KeywordField
then save_formset runs and saves the previous obj in self._product over the new
keywords_string are overwritten
fetching the Product in save_formset does indeed fix the issue, however, I am not sure if this is the best way to go about it
self._product=Product.objects.get(pk=self._product.pk)
The text was updated successfully, but these errors were encountered: