MCPcopy
hub / github.com/django/django / fetch_one

Method fetch_one

django/db/models/query_utils.py:296–297  ·  view source on GitHub ↗
(self, instance)

Source from the content-addressed store, hash-verified

294 return None
295
296 def fetch_one(self, instance):
297 instance.refresh_from_db(fields=[self.field.attname])
298
299 def fetch_many(self, instances):
300 attname = self.field.attname

Callers 2

fetchMethod · 0.45
fetchMethod · 0.45

Calls 1

refresh_from_dbMethod · 0.45

Tested by

no test coverage detected