[FIX] getting_started: remove useless lambda

The lambda function here is useless and makes newdooers think
they need to use it everytime.
`default=fields.Date.add(fields.Date.today(), months=3))`
should do the trick, no lambda involved.
This commit is contained in:
Claire Bretton (clbr)
2023-10-17 11:56:39 +02:00
parent 45885429fb
commit 42fec266ce

View File

@@ -232,7 +232,7 @@ Any field can be given a default value. In the field definition, add the option
float, string) or a function taking a model and returning a value::
name = fields.Char(default="Unknown")
last_seen = fields.Datetime("Last Seen", default=lambda self: fields.Datetime.now())
last_seen = fields.Datetime("Last Seen", default=fields.Datetime.now)
The ``name`` field will have the value 'Unknown' by default while the ``last_seen`` field will be
set as the current time.