mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 06:53:40 +08:00
050828d1de
This is extracted from #22390. This patch adds a new `optional` option to the `model` step. This means if an optional model returns something blank (`nil` or an empty collection) then the service won’t fail and will execute the next step. However if a model is properly returned, the step will try to check if it is valid or not (if it responds to `#invalid?`). If the model isn’t valid, then the step will fail (so no change here). |
||
---|---|---|
.. | ||
base.rb |