viur-framework / viur-core

The core component of ViUR, the Python framework for modern web development.
https://www.viur.dev
MIT License
13 stars 14 forks source link

add/edit with pre-filled information requires for a "report no errors"-bounce #1220

Open phorward opened 2 months ago

phorward commented 2 months ago

This issue is a little bit hard to describe... in some cases, the admin calls a module's add or edit function within a context, which pre-fills some bones e.g. a RelationalBone with mybone.dest.key=somekey and should validate them.

Depending on the skeleton, this might already lead in a creation or edit of the entry on initial load.

For this, there should be a special bounce-flag, which does the same as bounce=true, but without error reporting. So the input is parsed into the skeleton and returned as far as possible, but there should be no error reporting, this is done when "Save" is being hit.

Proposal:

  1. bounce=true should do the same as now, parse data, report errors, but don't save.
  2. bounce=silent should do the same as bounce=true, but without returning errors.