db.define_table('countries',
Field('country_name')
)
db.define_table('testing',
Field('origin','reference
countries',requires=IS_IN_DB(db,'countries.country_name',error_message='Choose
origin country'))
)
when i try to input testing from database administration, i get this error:
<class 'psycopg2.IntegrityError'> insert or update on table "testing"
violates foreign key constraint "sea_inquery_origin_fkey" DETAIL: Key
(origin)=(0) is not present in table "countries".
any idea? i create different tables but get same result.
--
---
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.