The way this sort of problem is fixed now is to use storm_validator on the model's property declaration.
e.g. from IArchive:
{{{
name = StringCol( dbName='name', notNull=True, storm_validator=_validate_archive_name)
}}}
_validate_archive_name() is a method that does this:
{{{
def _validate_archive_name(self, attr, value):
if not self._SO_creating:
assert self.is_copy, "Only COPY archives can be renamed."
assert valid_name(value), "Invalid name given to unproxied object."
return value
}}}
The way this sort of problem is fixed now is to use storm_validator on the model's property declaration.
e.g. from IArchive:
{{{
dbName= 'name', notNull=True, storm_validator =_validate_ archive_ name)
name = StringCol(
}}}
_validate_ archive_ name() is a method that does this:
{{{ archive_ name(self, attr, value):
def _validate_
if not self._SO_creating:
assert self.is_copy, "Only COPY archives can be renamed."
assert valid_name(value), "Invalid name given to unproxied object."
return value
}}}