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
MySQL doesn't allow updating the table you are already using in an inner select as the update criteria.
Fix is to wrap published values in list: TranslationEntry.objects.filter(original__in=list(published.values_list('original', flat=True))).update(is_published=True)
The text was updated successfully, but these errors were encountered:
OperationalError: (1093, "You can't specify target table 'translation_manager_translationentry' for update in FROM clause")
caused by:
TranslationEntry.objects.filter(original__in=published.values_list('original', flat=True)).update(is_published=True)
MySQL doesn't allow updating the table you are already using in an inner select as the update criteria.
Fix is to wrap published values in list:
TranslationEntry.objects.filter(original__in=list(published.values_list('original', flat=True))).update(is_published=True)
The text was updated successfully, but these errors were encountered: