It seems that the original code for keyed tables was wrongly patched at
some point in time.
That part of the code should read:
ftype = ftype + \
types['reference FK'] % dict(
constraint_name = constraint_name,
foreign_key = '%s (%s)' % (rtablename,
rfieldname),
field_name = field_name,
on_delete_action=field.ondelete)
Denes.
On Saturday, March 2, 2013 12:11:03 AM UTC-5, Dmitry Mosin wrote:
>
> Hi
>
> There is another exception
>
> <type 'exceptions.KeyError'> 'field_name'*File
> /var/www/py/web2py/gluon/dal.py in create_table at line 811*
>
> 806.
> 807.
> 808.
> 809.
> 810.
> 811.
>
> 812.
> 813.
> 814.
> 815.
>
> ftype = ftype + \
> types['reference FK'] % dict(
> constraint_name = constraint_name, #
> should be quoted
> foreign_key = '%s (%s)' % (rtablename,
> rfieldname),
> on_delete_action=field.ondelete)
>
> else:
> # make a guess here for circular references
> if referenced in db:
> id_fieldname = db[referenced]._id.name
>
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.