We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13c1778 commit 2ea0ee3Copy full SHA for 2ea0ee3
src/polymorphic/models.py
@@ -208,7 +208,7 @@ def accessor_function(self):
208
except KeyError:
209
objects = getattr(model, "_base_objects", model.objects)
210
rel_obj = objects.using(
211
- kwargs.get("using", self._state.db or DEFAULT_DB_ALIAS)
+ self._state.db or DEFAULT_DB_ALIAS
212
).get(pk=self.pk)
213
field.set_cached_value(self, rel_obj)
214
return rel_obj
0 commit comments