On Thursday 07 May 2009 16:53:44 cd34 wrote:
> In saprovider.py, it appears to be intentional:
>
> def add(self, table_name=None, values={}, columns_limit=None):
> for key, value in values.iteritems():
> if isinstance(value, FieldStorage):
> values[key] = value.value
>
> #remove the primary keys which could cause a conflict
> kw = self._remove_primary_keys_if_not_foreign(table_name,
> values)
>
> odd behavior, but, intentional.
That was not what I was saying. There might be good reasons to remove the IDs
because code downstream doesn't like it, but that doesn't mean that the
add-call should modify a dictionary passed to it that way. Instead, it should
create a copy, and modify that.
Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---