Skip to content

Commit

Permalink
patch for old schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ajslater committed Nov 22, 2021
1 parent 990ce96 commit 307b903
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions codex/integrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@

def _get_invalid_m2m_ids(comic_model, m2m_model, field_name):
"""Query for invalid_m2m_ids."""
# Special fix for old schema.
if field_name == "folders" and not getattr(comic_model, field_name):
field_name = "folder"
comic_m2m_ids = set(
comic_model.objects.all().values_list(f"{field_name}__id", flat=True)
)
Expand Down

0 comments on commit 307b903

Please sign in to comment.