Roundup Tracker - Issues

Issue 2551428

classification
What should happen if Class.create() is called without any props?
Type: behavior Severity: normal
Components: Database Versions:
process
Status: new
:
: : rouilj
Priority: :

Created on 2026-09-10 22:42 by rouilj, last changed 2026-09-10 22:42 by rouilj.

Messages
msg8515 Author: [hidden] (rouilj) Date: 2026-09-10 22:42
I was doing some refactoring by moving common code from backend/*
Class:set() and
Class:create() to hyperdb.py::Class.

I pulled (sometimes redundant checks) for database read/write mode and
propvalue
checks for reserved fields from rdbms_common.py and back_anydbm.py's
Class.set_inner()
and Class.create_inner() methods to hyperdb::Class.set()/create().

I noticed that set_inner() checks for empty propvalues and returns
propvalues. create_inner()
doesn't do that check but does the other checks.

What should happen when Class.create() is called without arguments and
the auditors don't
define any? This assumes issue2550911 (document/define default_value for
a prop) requires
an auditor set the default value for a property.

  1. create the empty object with no value for any fields.

  2. throw a ValueError or other exception.

  3. ???.

If the auditor does set a value, then we create a non-empty object using
the property
values set by the auditor.
History
Date User Action Args
2026-09-10 22:42:59rouiljcreate