Add option to automatically call `refresh_from_db`
Closed this issue · 2 comments
jonashaag commented
Let's say I'm lazy and specify timestamps as follows:
foo = mommy.make('Foo', created='2017-02-01')
Now foo.created == '2017-02-01'
. This may be unhandy if you then want to use the value, for example in assertions:
self.assertEqual(foo.created, datetime.datetime(...))
berinhard commented
@jonashaag maybe we could add flag like mommy.make('Foo', created='2017-02-01', _refresh_after_create=True)
.