[1.8.x] Fixed mistake in Model.from_db() example.
Backport of fd869cceac
from master
This commit is contained in:
parent
342074f4a4
commit
e2acbfb69b
|
@ -100,7 +100,7 @@ are loaded from the database::
|
||||||
instance._state.adding = False
|
instance._state.adding = False
|
||||||
instance._state.db = db
|
instance._state.db = db
|
||||||
# customization to store the original field values on the instance
|
# customization to store the original field values on the instance
|
||||||
instance._loaded_values = zip(field_names, values)
|
instance._loaded_values = dict(zip(field_names, values))
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue