If a table has a table name prefix, I can annotate it.
Current behavior:
Annotation fails because it's trying to use the unprefixed table name when getting the indexes.
Fix explanation
In retrieve_indexes_from_table, klass.table_name already contains the prefix if one exists. So, we shouldn't need to check separately for the prefixed or unprefixed version.
Tests
I tried to add tests; there is one failing and I'm not sure what the expected behavior is there/how to fix it. (Unclear to me if it's a test-specific failure or the fix I am suggesting doesn't work for this particular case).
Expected behavior:
If a table has a table name prefix, I can annotate it.
Current behavior:
Annotation fails because it's trying to use the unprefixed table name when getting the indexes.
Fix explanation
In
retrieve_indexes_from_table
, klass.table_name already contains the prefix if one exists. So, we shouldn't need to check separately for the prefixed or unprefixed version.Tests
I tried to add tests; there is one failing and I'm not sure what the expected behavior is there/how to fix it. (Unclear to me if it's a test-specific failure or the fix I am suggesting doesn't work for this particular case).
Related issues
Seems related possibly to https://github.com/ctran/annotate_models/issues/967 and this comment - we were seeing the same error message as that user.