We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pick a table and find its oid. In this example we'll use 716798.
Set import_verified to false.
import_verified
false
{ "jsonrpc": "2.0", "method": "tables.metadata.set", "id": 0, "params": { "database_id": 1, "table_oid": 716798, "metadata": { "import_verified": false } } }
This works.
Set import_verified to true.
true
{ "jsonrpc": "2.0", "method": "tables.metadata.set", "id": 0, "params": { "database_id": 1, "table_oid": 716798, "metadata": { "import_verified": true } } }
This should work.
But it fails with the following error:
IntegrityError: duplicate key value violates unique constraint "unique_table_metadata"\nDETAIL: Key (database_id, table_oid)=(1, 716798) already exists.
The text was updated successfully, but these errors were encountered:
I am not able to reproduce this @seancolsen, it seems to be working fine for me.
In [38]: a Out[38]: {'database_id': 1, 'table_oid': 716798, 'metadata': {'import_verified': False}} In [39]: b Out[39]: {'database_id': 1, 'table_oid': 716798, 'metadata': {'import_verified': True}} In [40]: set_table_meta_data(a['table_oid'], a['metadata'], 3) In [41]: TableMetaData.objects.all()[0].__dict__ Out[41]: {'_state': <django.db.models.base.ModelState at 0xffff98f0a4c0>, 'id': 1, 'created_at': datetime.datetime(2024, 9, 11, 10, 49, 11, 849546, tzinfo=datetime.timezone.utc), 'updated_at': datetime.datetime(2024, 9, 11, 10, 55, 47, 170329, tzinfo=datetime.timezone.utc), 'database_id': 3, 'table_oid': 716798, 'data_file_id': None, 'import_verified': False, 'column_order': None, 'record_summary_customized': None, 'record_summary_template': None} In [42]: set_table_meta_data(a['table_oid'], b['metadata'], 3) In [43]: TableMetaData.objects.all()[0].__dict__ Out[43]: {'_state': <django.db.models.base.ModelState at 0xffff99886250>, 'id': 1, 'created_at': datetime.datetime(2024, 9, 11, 10, 49, 11, 849546, tzinfo=datetime.timezone.utc), 'updated_at': datetime.datetime(2024, 9, 11, 10, 56, 10, 591215, tzinfo=datetime.timezone.utc), 'database_id': 3, 'table_oid': 716798, 'data_file_id': None, 'import_verified': True, 'column_order': None, 'record_summary_customized': None, 'record_summary_template': None}
Sorry, something went wrong.
We chatted about this on a call just now and I was able to get Anish to reproduce this via the UI within my branch for #3819
This was fixed in a791cb1 in #3819
Anish9901
No branches or pull requests
Steps to reproduce
Pick a table and find its oid. In this example we'll use 716798.
Set
import_verified
tofalse
.This works.
Set
import_verified
totrue
.This should work.
But it fails with the following error:
The text was updated successfully, but these errors were encountered: