Skip to content
New issue

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

Leftover references to apis_metainfo.collection #1377

Open
koeaw opened this issue Nov 13, 2024 · 0 comments
Open

Leftover references to apis_metainfo.collection #1377

koeaw opened this issue Nov 13, 2024 · 0 comments

Comments

@koeaw
Copy link
Contributor

koeaw commented Nov 13, 2024

I don't know how relevant this is for the larger code base because I only came across it via a DB of mine which turned out to have wonky migrations, but since I found previous mentions of this issue, I'm reporting it just in case:

While trying to apply migrations on this (wonky) DB, I got the following error:

ValueError: The field apis_entities.TempEntityClass.collection was declared with a lazy reference to 'apis_metainfo.collection', but app 'apis_metainfo' doesn't provide model 'collection'.
The field apis_entities.TempEntityClass_collection.collection was declared with a lazy reference to 'apis_metainfo.collection', but app 'apis_metainfo' doesn't provide model 'collection'.

I then found PR #964, which removed references to Collections from apis_vocabularies in commit b76bd4a.

The error I got was for apis_entitites. A search for "apis_metainfo.collections" turned up these two remaining references:

("collection", models.ManyToManyField(to="apis_metainfo.Collection")),

I don't know if these, too, should have got removed at the time or if mentions of the model were only removed from migrations for apis_vocabularies on purpose – the commit message in the linked PR could be interpreted to mean either.

I did not come across this error when running the migrate command for all apis_core apps on a brand new database on version v0.30.0, hence the caveat re: relevancy at the top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant