diff --git a/django_fsm/__init__.py b/django_fsm/__init__.py index bb07487..340060f 100644 --- a/django_fsm/__init__.py +++ b/django_fsm/__init__.py @@ -530,7 +530,7 @@ def _do_update(self, base_qs, using, pk_val, values, update_fields, forced_updat # INSERT if UPDATE fails. # Thus, we need to make sure we only catch the case when the object *is* in the DB, but with changed state; and # mimic standard _do_update behavior otherwise. Django will pick it up and execute _do_insert. - if not updated and base_qs.filter(pk=pk_val).exists(): + if not updated and base_qs.filter(pk=pk_val).using(using).exists(): raise ConcurrentTransition("Cannot save object! The state has been changed since fetched from the database!") return updated